summaryrefslogtreecommitdiff
path: root/src/cli/runtime/RT.cs
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2006-06-10 19:29:20 +0000
committerRich Hickey <richhickey@gmail.com>2006-06-10 19:29:20 +0000
commitac65dac6b044e965d244e78ee5f7d49a62440c92 (patch)
treede2166d549ba01a21151bddd68ecf01e7adc5d25 /src/cli/runtime/RT.cs
parentdc5642e9d61e6a6099d3b9690ff3e40415d532c7 (diff)
interim checkin, modified TLD - Var broken
Diffstat (limited to 'src/cli/runtime/RT.cs')
-rw-r--r--src/cli/runtime/RT.cs82
1 files changed, 7 insertions, 75 deletions
diff --git a/src/cli/runtime/RT.cs b/src/cli/runtime/RT.cs
index 06455b47..fcae27b6 100644
--- a/src/cli/runtime/RT.cs
+++ b/src/cli/runtime/RT.cs
@@ -290,81 +290,13 @@ static public bool isLineNumberingReader(TextReader r)
/*-------------------------------- values --------------*/
-static public Object setValues(ThreadLocalData tld, Object arg1)
- {
- if(tld == null)
- tld = ThreadLocalData.get();
- tld.mvCount = 1;
- tld.mvArray[0] = arg1;
- return arg1;
- }
-
-static public Object setValues(ThreadLocalData tld, Object arg1, Object arg2)
- {
- if(tld == null)
- tld = ThreadLocalData.get();
- tld.mvCount = 2;
- tld.mvArray[0] = arg1;
- tld.mvArray[1] = arg2;
- return arg1;
- }
-
-static public Object setValues(ThreadLocalData tld, Object arg1, Object arg2, Object arg3)
- {
- if(tld == null)
- tld = ThreadLocalData.get();
- tld.mvCount = 3;
- tld.mvArray[0] = arg1;
- tld.mvArray[1] = arg2;
- tld.mvArray[2] = arg3;
- return arg1;
- }
-
-static public Object setValues(ThreadLocalData tld, Object arg1, Object arg2, Object arg3, Object arg4)
- {
- if(tld == null)
- tld = ThreadLocalData.get();
- tld.mvCount = 4;
- tld.mvArray[0] = arg1;
- tld.mvArray[1] = arg2;
- tld.mvArray[2] = arg3;
- tld.mvArray[3] = arg4;
- return arg1;
- }
-
-static public Object setValues(ThreadLocalData tld, Object arg1, Object arg2, Object arg3, Object arg4,
- Object arg5)
- {
- if(tld == null)
- tld = ThreadLocalData.get();
- tld.mvCount = 5;
- tld.mvArray[0] = arg1;
- tld.mvArray[1] = arg2;
- tld.mvArray[2] = arg3;
- tld.mvArray[3] = arg4;
- tld.mvArray[4] = arg5;
- return arg1;
- }
-
-static public Object setValues(ThreadLocalData tld, Object arg1, Object arg2, Object arg3, Object arg4,
- Object arg5, ISeq args) /**/
- {
- if(tld == null)
- tld = ThreadLocalData.get();
- tld.mvCount = 5;
- tld.mvArray[0] = arg1;
- tld.mvArray[1] = arg2;
- tld.mvArray[2] = arg3;
- tld.mvArray[3] = arg4;
- tld.mvArray[4] = arg5;
- for(int i = 5; args != null && i < ThreadLocalData.MULTIPLE_VALUES_LIMIT; i++, args = args.rest())
- {
- tld.mvArray[i] = args.first();
- }
- if(args != null)
- throw new ArgumentException("Too many arguments to values (> ThreadLocalData.MULTIPLE_VALUES_LIMIT)");
- return arg1;
- }
+static public Object setValues(params Object[] vals)
+ {
+ ThreadLocalData.setValues(vals);
+ if(vals.Length > 0)
+ return vals[0];
+ return null;
+ }
}
} \ No newline at end of file