diff --git a/dotnet/compiler/PAST2DNSTCompiler.pm b/dotnet/compiler/PAST2DNSTCompiler.pm
index aae9aa4..164c37a 100644
--- a/dotnet/compiler/PAST2DNSTCompiler.pm
+++ b/dotnet/compiler/PAST2DNSTCompiler.pm
@@ -89,7 +89,7 @@ method compile(PAST::Node $node) {
DNST::MethodCall.new(
:on('StaticBlockInfo[1].StaticLexPad'), :name('SetByName'),
DNST::Literal.new( :value('NQPStr'), :escape(1) ),
- 'REPRRegistry.get_REPR_by_name("P6str").type_object_for(null)'
+ 'REPRRegistry.get_REPR_by_name("P6str").type_object_for(null, null)'
),
# We do the loadinit calls before building the constants, as we
diff --git a/dotnet/runtime/Init.cs b/dotnet/runtime/Init.cs
index fd5b4d9..a8cd0c4 100644
--- a/dotnet/runtime/Init.cs
+++ b/dotnet/runtime/Init.cs
@@ -92,15 +92,15 @@ private static Context BootstrapSetting(RakudoObject KnowHOW)
SettingContext.LexPad.Storage = new RakudoObject[]
{
KnowHOW,
- REPRRegistry.get_REPR_by_name("P6capture").type_object_for(null),
- REPRRegistry.get_REPR_by_name("P6int").type_object_for(null),
- REPRRegistry.get_REPR_by_name("P6num").type_object_for(null),
- REPRRegistry.get_REPR_by_name("P6str").type_object_for(null),
- REPRRegistry.get_REPR_by_name("RakudoCodeRef").type_object_for(KnowHOW.STable.REPR.instance_of(KnowHOW)),
+ REPRRegistry.get_REPR_by_name("P6capture").type_object_for(null, null),
+ REPRRegistry.get_REPR_by_name("P6int").type_object_for(null, null),
+ REPRRegistry.get_REPR_by_name("P6num").type_object_for(null, null),
+ REPRRegistry.get_REPR_by_name("P6str").type_object_for(null, null),
+ REPRRegistry.get_REPR_by_name("RakudoCodeRef").type_object_for(null, KnowHOW.STable.REPR.instance_of(null, KnowHOW)),
CodeObjectUtility.WrapNativeMethod((TC, self, C) =>
{
var NQPList = Ops.get_lex(TC, "NQPList");
- var List = NQPList.STable.REPR.instance_of(NQPList) as P6list.Instance;
+ var List = NQPList.STable.REPR.instance_of(TC, NQPList) as P6list.Instance;
var NativeCapture = C as P6capture.Instance;
foreach (var Obj in NativeCapture.Positionals)
List.Storage.Add(Obj);
@@ -151,8 +151,8 @@ public static Context LoadSetting(string Name, RakudoObject KnowHOW)
Console.WriteLine(Ops.unbox_str(null, StrVal));
return CaptureHelper.Nil();
}));
- SettingContext.LexPad.SetByName("capture", REPRRegistry.get_REPR_by_name("P6capture").type_object_for(null));
- SettingContext.LexPad.SetByName("LLCode", REPRRegistry.get_REPR_by_name("RakudoCodeRef").type_object_for(KnowHOW.STable.REPR.instance_of(KnowHOW)));
+ SettingContext.LexPad.SetByName("capture", REPRRegistry.get_REPR_by_name("P6capture").type_object_for(null, null));
+ SettingContext.LexPad.SetByName("LLCode", REPRRegistry.get_REPR_by_name("RakudoCodeRef").type_object_for(null, KnowHOW.STable.REPR.instance_of(null, KnowHOW)));
return SettingContext;
}
diff --git a/dotnet/runtime/Metamodel/KnowHOW/KnowHOWBootstrapper.cs b/dotnet/runtime/Metamodel/KnowHOW/KnowHOWBootstrapper.cs
index 5331bc7..52b79dd 100644
--- a/dotnet/runtime/Metamodel/KnowHOW/KnowHOWBootstrapper.cs
+++ b/dotnet/runtime/Metamodel/KnowHOW/KnowHOWBootstrapper.cs
@@ -28,7 +28,7 @@ public static RakudoObject Bootstrap()
// Create our KnowHOW type object. Note we don't have a HOW
// just yet, so pass in null.
var REPR = REPRRegistry.get_REPR_by_name("KnowHOWREPR");
- var KnowHOW = REPR.type_object_for(null);
+ var KnowHOW = REPR.type_object_for(null, null);
// We'll set up a dictionary of our various methods to go into
// KnowHOW's HOW, since we'll want to work with them a bit.
@@ -37,7 +37,7 @@ public static RakudoObject Bootstrap()
{
// We first create a new HOW instance.
var KnowHOWTypeObj = CaptureHelper.GetPositional(Cap, 0);
- var HOW = KnowHOWTypeObj.STable.REPR.instance_of(KnowHOWTypeObj.STable.WHAT);
+ var HOW = KnowHOWTypeObj.STable.REPR.instance_of(TC, KnowHOWTypeObj.STable.WHAT);
// Now create a new type object to go with it of the
// desired REPR; we default to P6opaque (note that the
@@ -50,12 +50,12 @@ public static RakudoObject Bootstrap()
{
// Look up the REPR.
var REPRToUse = REPRRegistry.get_REPR_by_name(Ops.unbox_str(null, REPRName));
- return REPRToUse.type_object_for(HOW);
+ return REPRToUse.type_object_for(null, HOW);
}
else
{
// Just go with the P6opaque REPR.
- return REPRRegistry.get_REPR_by_name("P6opaque").type_object_for(HOW);
+ return REPRRegistry.get_REPR_by_name("P6opaque").type_object_for(TC, HOW);
}
}));
KnowHOWMeths.Add("add_attribute", CodeObjectUtility.WrapNativeMethod((TC, Ignored, Cap) =>
@@ -94,7 +94,7 @@ public static RakudoObject Bootstrap()
// We create a KnowHOW instance that can describe itself. This
// means .HOW.HOW.HOW.HOW etc will always return that, which
// closes the model up.
- var KnowHOWHOW = (KnowHOWREPR.KnowHOWInstance)REPR.instance_of(KnowHOW);
+ var KnowHOWHOW = (KnowHOWREPR.KnowHOWInstance)REPR.instance_of(null, KnowHOW);
foreach (var Method in KnowHOWMeths)
KnowHOWHOW.Methods.Add(Method.Key, Method.Value);
diff --git a/dotnet/runtime/Metamodel/KnowHOW/KnowHOWREPR.cs b/dotnet/runtime/Metamodel/KnowHOW/KnowHOWREPR.cs
index 01e911b..91cdb24 100644
--- a/dotnet/runtime/Metamodel/KnowHOW/KnowHOWREPR.cs
+++ b/dotnet/runtime/Metamodel/KnowHOW/KnowHOWREPR.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Rakudo.Runtime;
namespace Rakudo.Metamodel.KnowHOW
{
@@ -31,7 +32,7 @@ public KnowHOWInstance(SharedTable STable)
///
///
///
- public override RakudoObject type_object_for(RakudoObject HOW)
+ public override RakudoObject type_object_for(ThreadContext TC, RakudoObject HOW)
{
var STable = new SharedTable();
STable.HOW = HOW;
@@ -45,7 +46,7 @@ public override RakudoObject type_object_for(RakudoObject HOW)
///
///
///
- public override RakudoObject instance_of(RakudoObject WHAT)
+ public override RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT)
{
var Object = new KnowHOWInstance(WHAT.STable);
Object.Methods = new Dictionary();
@@ -58,27 +59,27 @@ public override RakudoObject instance_of(RakudoObject WHAT)
///
///
///
- public override bool defined(RakudoObject Obj)
+ public override bool defined(ThreadContext TC, RakudoObject Obj)
{
return ((KnowHOWInstance)Obj).Methods != null;
}
- public override RakudoObject get_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name)
+ public override RakudoObject get_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name)
{
throw new NotImplementedException();
}
- public override RakudoObject get_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
+ public override RakudoObject get_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
{
throw new NotImplementedException();
}
- public override void bind_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
+ public override void bind_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
{
throw new NotImplementedException();
}
- public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
+ public override void bind_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
{
throw new NotImplementedException();
}
@@ -90,37 +91,37 @@ public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject
///
///
///
- public override int hint_for(RakudoObject ClassHandle, string Name)
+ public override int hint_for(ThreadContext TC, RakudoObject ClassHandle, string Name)
{
return Hints.NO_HINT;
}
- public override void set_int(RakudoObject Object, int Value)
+ public override void set_int(ThreadContext TC, RakudoObject Object, int Value)
{
throw new InvalidOperationException("This type of representation cannot box a native int");
}
- public override int get_int(RakudoObject Object)
+ public override int get_int(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native int");
}
- public override void set_num(RakudoObject Object, double Value)
+ public override void set_num(ThreadContext TC, RakudoObject Object, double Value)
{
throw new InvalidOperationException("This type of representation cannot box a native num");
}
- public override double get_num(RakudoObject Object)
+ public override double get_num(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native num");
}
- public override void set_str(RakudoObject Object, string Value)
+ public override void set_str(ThreadContext TC, RakudoObject Object, string Value)
{
throw new InvalidOperationException("This type of representation cannot box a native string");
}
- public override string get_str(RakudoObject Object)
+ public override string get_str(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native string");
}
diff --git a/dotnet/runtime/Metamodel/Representation.cs b/dotnet/runtime/Metamodel/Representation.cs
index ade74e6..61e28a2 100644
--- a/dotnet/runtime/Metamodel/Representation.cs
+++ b/dotnet/runtime/Metamodel/Representation.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Rakudo.Runtime;
namespace Rakudo.Metamodel
{
@@ -17,21 +18,21 @@ public abstract class Representation
///
///
///
- public abstract RakudoObject type_object_for(RakudoObject HOW);
+ public abstract RakudoObject type_object_for(ThreadContext TC, RakudoObject HOW);
///
/// Creates a new instance based on the type object.
///
///
///
- public abstract RakudoObject instance_of(RakudoObject WHAT);
+ public abstract RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT);
///
/// Checks if a given object is defined.
///
///
///
- public abstract bool defined(RakudoObject Obj);
+ public abstract bool defined(ThreadContext TC, RakudoObject Obj);
///
/// Gets the current value for an attribute.
@@ -39,7 +40,7 @@ public abstract class Representation
///
///
///
- public abstract RakudoObject get_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name);
+ public abstract RakudoObject get_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name);
///
/// Gets the current value for an attribute, obtained using the
@@ -49,7 +50,7 @@ public abstract class Representation
///
///
///
- public abstract RakudoObject get_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint);
+ public abstract RakudoObject get_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint);
///
/// Binds the given value to the specified attribute.
@@ -57,7 +58,7 @@ public abstract class Representation
///
///
///
- public abstract void bind_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value);
+ public abstract void bind_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value);
///
/// Binds the given value to the specified attribute, using the
@@ -67,7 +68,7 @@ public abstract class Representation
///
///
///
- public abstract void bind_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value);
+ public abstract void bind_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value);
///
/// Gets the hint for the given attribute ID.
@@ -75,7 +76,7 @@ public abstract class Representation
///
///
///
- public abstract int hint_for(RakudoObject ClassHandle, string Name);
+ public abstract int hint_for(ThreadContext TC, RakudoObject ClassHandle, string Name);
///
/// Used with boxing. Sets an integer value, for representations that
@@ -83,7 +84,7 @@ public abstract class Representation
///
///
///
- public abstract void set_int(RakudoObject Object, int Value);
+ public abstract void set_int(ThreadContext TC, RakudoObject Object, int Value);
///
/// Used with boxing. Gets an integer value, for representations that
@@ -91,7 +92,7 @@ public abstract class Representation
///
///
///
- public abstract int get_int(RakudoObject Object);
+ public abstract int get_int(ThreadContext TC, RakudoObject Object);
///
/// Used with boxing. Sets a floating point value, for representations that
@@ -99,7 +100,7 @@ public abstract class Representation
///
///
///
- public abstract void set_num(RakudoObject Object, double Value);
+ public abstract void set_num(ThreadContext TC, RakudoObject Object, double Value);
///
/// Used with boxing. Gets a floating point value, for representations that
@@ -107,7 +108,7 @@ public abstract class Representation
///
///
///
- public abstract double get_num(RakudoObject Object);
+ public abstract double get_num(ThreadContext TC, RakudoObject Object);
///
/// Used with boxing. Sets a string value, for representations that
@@ -115,7 +116,7 @@ public abstract class Representation
///
///
///
- public abstract void set_str(RakudoObject Object, string Value);
+ public abstract void set_str(ThreadContext TC, RakudoObject Object, string Value);
///
/// Used with boxing. Gets a string value, for representations that
@@ -123,7 +124,7 @@ public abstract class Representation
///
///
///
- public abstract string get_str(RakudoObject Object);
+ public abstract string get_str(ThreadContext TC, RakudoObject Object);
}
public static class Hints
diff --git a/dotnet/runtime/Metamodel/Representations/P6capture.cs b/dotnet/runtime/Metamodel/Representations/P6capture.cs
index 52f0bfb..883e0da 100644
--- a/dotnet/runtime/Metamodel/Representations/P6capture.cs
+++ b/dotnet/runtime/Metamodel/Representations/P6capture.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Rakudo.Runtime;
namespace Rakudo.Metamodel.Representations
{
@@ -28,7 +29,7 @@ public Instance(SharedTable STable)
///
///
///
- public override RakudoObject type_object_for(RakudoObject MetaPackage)
+ public override RakudoObject type_object_for(ThreadContext TC, RakudoObject MetaPackage)
{
var STable = new SharedTable();
STable.HOW = MetaPackage;
@@ -42,7 +43,7 @@ public override RakudoObject type_object_for(RakudoObject MetaPackage)
///
///
///
- public override RakudoObject instance_of(RakudoObject WHAT)
+ public override RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT)
{
return new Instance(WHAT.STable);
}
@@ -52,63 +53,63 @@ public override RakudoObject instance_of(RakudoObject WHAT)
///
///
///
- public override bool defined(RakudoObject O)
+ public override bool defined(ThreadContext TC, RakudoObject O)
{
var Obj = (Instance)O;
return Obj.Positionals != null || Obj.Nameds != null;
}
- public override RakudoObject get_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name)
+ public override RakudoObject get_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name)
{
throw new InvalidOperationException("Native captures cannot store additional attributes.");
}
- public override RakudoObject get_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
+ public override RakudoObject get_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
{
throw new InvalidOperationException("Native captures cannot store additional attributes.");
}
- public override void bind_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
+ public override void bind_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
{
throw new InvalidOperationException("Native captures cannot store additional attributes.");
}
- public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
+ public override void bind_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
{
throw new InvalidOperationException("Native captures cannot store additional attributes.");
}
- public override int hint_for(RakudoObject ClassHandle, string Name)
+ public override int hint_for(ThreadContext TC, RakudoObject ClassHandle, string Name)
{
return Hints.NO_HINT;
}
- public override void set_int(RakudoObject Object, int Value)
+ public override void set_int(ThreadContext TC, RakudoObject Object, int Value)
{
throw new InvalidOperationException("This type of representation cannot box a native int");
}
- public override int get_int(RakudoObject Object)
+ public override int get_int(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native int");
}
- public override void set_num(RakudoObject Object, double Value)
+ public override void set_num(ThreadContext TC, RakudoObject Object, double Value)
{
throw new InvalidOperationException("This type of representation cannot box a native num");
}
- public override double get_num(RakudoObject Object)
+ public override double get_num(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native num");
}
- public override void set_str(RakudoObject Object, string Value)
+ public override void set_str(ThreadContext TC, RakudoObject Object, string Value)
{
throw new InvalidOperationException("This type of representation cannot box a native string");
}
- public override string get_str(RakudoObject Object)
+ public override string get_str(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native string");
}
diff --git a/dotnet/runtime/Metamodel/Representations/P6hash.cs b/dotnet/runtime/Metamodel/Representations/P6hash.cs
index f669d2c..da9b6ed 100644
--- a/dotnet/runtime/Metamodel/Representations/P6hash.cs
+++ b/dotnet/runtime/Metamodel/Representations/P6hash.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Rakudo.Runtime;
namespace Rakudo.Metamodel.Representations
{
@@ -36,7 +37,7 @@ public Instance(SharedTable STable)
///
///
///
- public override RakudoObject type_object_for(RakudoObject MetaPackage)
+ public override RakudoObject type_object_for(ThreadContext TC, RakudoObject MetaPackage)
{
var STable = new SharedTable();
STable.HOW = MetaPackage;
@@ -51,7 +52,7 @@ public override RakudoObject type_object_for(RakudoObject MetaPackage)
///
///
///
- public override RakudoObject instance_of(RakudoObject WHAT)
+ public override RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT)
{
var Object = new Instance(WHAT.STable);
Object.Storage = new Dictionary>();
@@ -65,7 +66,7 @@ public override RakudoObject instance_of(RakudoObject WHAT)
///
///
///
- public override bool defined(RakudoObject Object)
+ public override bool defined(ThreadContext TC, RakudoObject Object)
{
return ((Instance)Object).Storage != null;
}
@@ -76,7 +77,7 @@ public override bool defined(RakudoObject Object)
///
///
///
- public override RakudoObject get_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name)
+ public override RakudoObject get_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name)
{
// If no storage ever allocated, trivially no value. Otherwise,
// return what we find.
@@ -95,9 +96,9 @@ public override RakudoObject get_attribute(RakudoObject Object, RakudoObject Cla
///
///
///
- public override RakudoObject get_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
+ public override RakudoObject get_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
{
- return get_attribute(Object, ClassHandle, Name);
+ return get_attribute(TC, Object, ClassHandle, Name);
}
///
@@ -107,7 +108,7 @@ public override RakudoObject get_attribute_with_hint(RakudoObject Object, Rakudo
///
///
///
- public override void bind_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
+ public override void bind_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
{
// If no storage at all, allocate some.
var I = (Instance)Object;
@@ -133,9 +134,9 @@ public override void bind_attribute(RakudoObject Object, RakudoObject ClassHandl
///
///
///
- public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
+ public override void bind_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
{
- bind_attribute(Object, ClassHandle, Name, Value);
+ bind_attribute(TC, Object, ClassHandle, Name, Value);
}
///
@@ -144,37 +145,37 @@ public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject
///
///
///
- public override int hint_for(RakudoObject ClassHandle, string Name)
+ public override int hint_for(ThreadContext TC, RakudoObject ClassHandle, string Name)
{
return Hints.NO_HINT;
}
- public override void set_int(RakudoObject Object, int Value)
+ public override void set_int(ThreadContext TC, RakudoObject Object, int Value)
{
throw new InvalidOperationException("This type of representation cannot box a native int");
}
- public override int get_int(RakudoObject Object)
+ public override int get_int(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native int");
}
- public override void set_num(RakudoObject Object, double Value)
+ public override void set_num(ThreadContext TC, RakudoObject Object, double Value)
{
throw new InvalidOperationException("This type of representation cannot box a native num");
}
- public override double get_num(RakudoObject Object)
+ public override double get_num(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native num");
}
- public override void set_str(RakudoObject Object, string Value)
+ public override void set_str(ThreadContext TC, RakudoObject Object, string Value)
{
throw new InvalidOperationException("This type of representation cannot box a native string");
}
- public override string get_str(RakudoObject Object)
+ public override string get_str(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native string");
}
diff --git a/dotnet/runtime/Metamodel/Representations/P6int.cs b/dotnet/runtime/Metamodel/Representations/P6int.cs
index a6ab0ee..3e7d73f 100644
--- a/dotnet/runtime/Metamodel/Representations/P6int.cs
+++ b/dotnet/runtime/Metamodel/Representations/P6int.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Rakudo.Runtime;
namespace Rakudo.Metamodel.Representations
{
@@ -29,7 +30,7 @@ public Instance(SharedTable STable)
///
///
///
- public override RakudoObject type_object_for(RakudoObject MetaPackage)
+ public override RakudoObject type_object_for(ThreadContext TC, RakudoObject MetaPackage)
{
var STable = new SharedTable();
STable.HOW = MetaPackage;
@@ -45,7 +46,7 @@ public override RakudoObject type_object_for(RakudoObject MetaPackage)
///
///
///
- public override RakudoObject instance_of(RakudoObject WHAT)
+ public override RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT)
{
return new Instance(WHAT.STable);
}
@@ -55,62 +56,62 @@ public override RakudoObject instance_of(RakudoObject WHAT)
///
///
///
- public override bool defined(RakudoObject Obj)
+ public override bool defined(ThreadContext TC, RakudoObject Obj)
{
return !((Instance)Obj).Undefined;
}
- public override RakudoObject get_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name)
+ public override RakudoObject get_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override RakudoObject get_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
+ public override RakudoObject get_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override void bind_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
+ public override void bind_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
+ public override void bind_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override int hint_for(RakudoObject ClassHandle, string Name)
+ public override int hint_for(ThreadContext TC, RakudoObject ClassHandle, string Name)
{
return Hints.NO_HINT;
}
- public override void set_int(RakudoObject Object, int Value)
+ public override void set_int(ThreadContext TC, RakudoObject Object, int Value)
{
((Instance)Object).Value = Value;
}
- public override int get_int(RakudoObject Object)
+ public override int get_int(ThreadContext TC, RakudoObject Object)
{
return ((Instance)Object).Value;
}
- public override void set_num(RakudoObject Object, double Value)
+ public override void set_num(ThreadContext TC, RakudoObject Object, double Value)
{
throw new InvalidOperationException("This type of representation cannot box a native num");
}
- public override double get_num(RakudoObject Object)
+ public override double get_num(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native num");
}
- public override void set_str(RakudoObject Object, string Value)
+ public override void set_str(ThreadContext TC, RakudoObject Object, string Value)
{
throw new InvalidOperationException("This type of representation cannot box a native string");
}
- public override string get_str(RakudoObject Object)
+ public override string get_str(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native string");
}
diff --git a/dotnet/runtime/Metamodel/Representations/P6list.cs b/dotnet/runtime/Metamodel/Representations/P6list.cs
index 78380db..b2b8df2 100644
--- a/dotnet/runtime/Metamodel/Representations/P6list.cs
+++ b/dotnet/runtime/Metamodel/Representations/P6list.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Rakudo.Runtime;
namespace Rakudo.Metamodel.Representations
{
@@ -32,7 +33,7 @@ public Instance(SharedTable STable)
///
///
///
- public override RakudoObject type_object_for(RakudoObject MetaPackage)
+ public override RakudoObject type_object_for(ThreadContext TC, RakudoObject MetaPackage)
{
var STable = new SharedTable();
STable.HOW = MetaPackage;
@@ -46,7 +47,7 @@ public override RakudoObject type_object_for(RakudoObject MetaPackage)
///
///
///
- public override RakudoObject instance_of(RakudoObject WHAT)
+ public override RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT)
{
var Object = new Instance(WHAT.STable);
Object.Storage = new List();
@@ -58,62 +59,62 @@ public override RakudoObject instance_of(RakudoObject WHAT)
///
///
///
- public override bool defined(RakudoObject Obj)
+ public override bool defined(ThreadContext TC, RakudoObject Obj)
{
return ((Instance)Obj).Storage != null;
}
- public override RakudoObject get_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name)
+ public override RakudoObject get_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name)
{
throw new NotImplementedException();
}
- public override RakudoObject get_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
+ public override RakudoObject get_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
{
throw new NotImplementedException();
}
- public override void bind_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
+ public override void bind_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
{
throw new NotImplementedException();
}
- public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
+ public override void bind_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
{
throw new NotImplementedException();
}
- public override int hint_for(RakudoObject ClassHandle, string Name)
+ public override int hint_for(ThreadContext TC, RakudoObject ClassHandle, string Name)
{
throw new NotImplementedException();
}
- public override void set_int(RakudoObject Object, int Value)
+ public override void set_int(ThreadContext TC, RakudoObject Object, int Value)
{
throw new NotImplementedException();
}
- public override int get_int(RakudoObject Object)
+ public override int get_int(ThreadContext TC, RakudoObject Object)
{
throw new NotImplementedException();
}
- public override void set_num(RakudoObject Object, double Value)
+ public override void set_num(ThreadContext TC, RakudoObject Object, double Value)
{
throw new NotImplementedException();
}
- public override double get_num(RakudoObject Object)
+ public override double get_num(ThreadContext TC, RakudoObject Object)
{
throw new NotImplementedException();
}
- public override void set_str(RakudoObject Object, string Value)
+ public override void set_str(ThreadContext TC, RakudoObject Object, string Value)
{
throw new NotImplementedException();
}
- public override string get_str(RakudoObject Object)
+ public override string get_str(ThreadContext TC, RakudoObject Object)
{
throw new NotImplementedException();
}
diff --git a/dotnet/runtime/Metamodel/Representations/P6num.cs b/dotnet/runtime/Metamodel/Representations/P6num.cs
index 8b87c61..9482776 100644
--- a/dotnet/runtime/Metamodel/Representations/P6num.cs
+++ b/dotnet/runtime/Metamodel/Representations/P6num.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Rakudo.Runtime;
namespace Rakudo.Metamodel.Representations
{
@@ -29,7 +30,7 @@ public Instance(SharedTable STable)
///
///
///
- public override RakudoObject type_object_for(RakudoObject MetaPackage)
+ public override RakudoObject type_object_for(ThreadContext TC, RakudoObject MetaPackage)
{
var STable = new SharedTable();
STable.HOW = MetaPackage;
@@ -45,7 +46,7 @@ public override RakudoObject type_object_for(RakudoObject MetaPackage)
///
///
///
- public override RakudoObject instance_of(RakudoObject WHAT)
+ public override RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT)
{
return new Instance(WHAT.STable);
}
@@ -55,62 +56,62 @@ public override RakudoObject instance_of(RakudoObject WHAT)
///
///
///
- public override bool defined(RakudoObject Obj)
+ public override bool defined(ThreadContext TC, RakudoObject Obj)
{
return !((Instance)Obj).Undefined;
}
- public override RakudoObject get_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name)
+ public override RakudoObject get_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override RakudoObject get_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
+ public override RakudoObject get_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override void bind_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
+ public override void bind_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
+ public override void bind_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override int hint_for(RakudoObject ClassHandle, string Name)
+ public override int hint_for(ThreadContext TC, RakudoObject ClassHandle, string Name)
{
return Hints.NO_HINT;
}
- public override void set_int(RakudoObject Object, int Value)
+ public override void set_int(ThreadContext TC, RakudoObject Object, int Value)
{
throw new InvalidOperationException("This type of representation cannot box a native int");
}
- public override int get_int(RakudoObject Object)
+ public override int get_int(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native int");
}
- public override void set_num(RakudoObject Object, double Value)
+ public override void set_num(ThreadContext TC, RakudoObject Object, double Value)
{
((Instance)Object).Value = Value;
}
- public override double get_num(RakudoObject Object)
+ public override double get_num(ThreadContext TC, RakudoObject Object)
{
return ((Instance)Object).Value;
}
- public override void set_str(RakudoObject Object, string Value)
+ public override void set_str(ThreadContext TC, RakudoObject Object, string Value)
{
throw new InvalidOperationException("This type of representation cannot box a native string");
}
- public override string get_str(RakudoObject Object)
+ public override string get_str(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native string");
}
diff --git a/dotnet/runtime/Metamodel/Representations/P6opaque.cs b/dotnet/runtime/Metamodel/Representations/P6opaque.cs
index 76c1404..9ad9194 100644
--- a/dotnet/runtime/Metamodel/Representations/P6opaque.cs
+++ b/dotnet/runtime/Metamodel/Representations/P6opaque.cs
@@ -44,7 +44,7 @@ public Instance(SharedTable STable)
///
///
///
- public override RakudoObject type_object_for(RakudoObject MetaPackage)
+ public override RakudoObject type_object_for(ThreadContext TC, RakudoObject MetaPackage)
{
var STable = new SharedTable();
STable.HOW = MetaPackage;
@@ -60,10 +60,10 @@ public override RakudoObject type_object_for(RakudoObject MetaPackage)
///
///
///
- public override RakudoObject instance_of(RakudoObject WHAT)
+ public override RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT)
{
if (SlotAllocation == null)
- ComputeSlotAllocation(null, WHAT);
+ ComputeSlotAllocation(TC, WHAT);
var Object = new Instance(WHAT.STable);
Object.SlotStorage = new RakudoObject[Slots];
return Object;
@@ -76,7 +76,7 @@ public override RakudoObject instance_of(RakudoObject WHAT)
///
///
///
- public override bool defined(RakudoObject Object)
+ public override bool defined(ThreadContext TC, RakudoObject Object)
{
return ((Instance)Object).SlotStorage != null;
}
@@ -88,7 +88,7 @@ public override bool defined(RakudoObject Object)
///
///
///
- public override RakudoObject get_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name)
+ public override RakudoObject get_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name)
{
var I = (Instance)Object;
@@ -118,7 +118,7 @@ public override RakudoObject get_attribute(RakudoObject Object, RakudoObject Cla
///
///
///
- public override RakudoObject get_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
+ public override RakudoObject get_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
{
var I = (Instance)Object;
if (Hint < I.SlotStorage.Length)
@@ -144,7 +144,7 @@ public override RakudoObject get_attribute_with_hint(RakudoObject Object, Rakudo
///
///
///
- public override void bind_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
+ public override void bind_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
{
var I = (Instance)Object;
@@ -178,14 +178,14 @@ public override void bind_attribute(RakudoObject Object, RakudoObject ClassHandl
///
///
///
- public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
+ public override void bind_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
{
var I = (Instance)Object;
if (Hint < I.SlotStorage.Length)
{
I.SlotStorage[Hint] = Value;
}
- else if ((Hint = hint_for(ClassHandle, Name)) != Hints.NO_HINT && Hint < I.SlotStorage.Length)
+ else if ((Hint = hint_for(TC, ClassHandle, Name)) != Hints.NO_HINT && Hint < I.SlotStorage.Length)
{
I.SlotStorage[Hint] = Value;
}
@@ -210,7 +210,7 @@ public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject
///
///
///
- public override int hint_for(RakudoObject ClassHandle, string Name)
+ public override int hint_for(ThreadContext TC, RakudoObject ClassHandle, string Name)
{
if (SlotAllocation.ContainsKey(ClassHandle) && SlotAllocation[ClassHandle].ContainsKey(Name))
return SlotAllocation[ClassHandle][Name];
@@ -218,32 +218,32 @@ public override int hint_for(RakudoObject ClassHandle, string Name)
return Hints.NO_HINT;
}
- public override void set_int(RakudoObject Object, int Value)
+ public override void set_int(ThreadContext TC, RakudoObject Object, int Value)
{
throw new InvalidOperationException("This type of representation cannot box a native int");
}
- public override int get_int(RakudoObject Object)
+ public override int get_int(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native int");
}
- public override void set_num(RakudoObject Object, double Value)
+ public override void set_num(ThreadContext TC, RakudoObject Object, double Value)
{
throw new InvalidOperationException("This type of representation cannot box a native num");
}
- public override double get_num(RakudoObject Object)
+ public override double get_num(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native num");
}
- public override void set_str(RakudoObject Object, string Value)
+ public override void set_str(ThreadContext TC, RakudoObject Object, string Value)
{
throw new InvalidOperationException("This type of representation cannot box a native string");
}
- public override string get_str(RakudoObject Object)
+ public override string get_str(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native string");
}
diff --git a/dotnet/runtime/Metamodel/Representations/P6str.cs b/dotnet/runtime/Metamodel/Representations/P6str.cs
index 3e147e9..4d9f387 100644
--- a/dotnet/runtime/Metamodel/Representations/P6str.cs
+++ b/dotnet/runtime/Metamodel/Representations/P6str.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Rakudo.Runtime;
namespace Rakudo.Metamodel.Representations
{
@@ -28,7 +29,7 @@ public Instance(SharedTable STable)
///
///
///
- public override RakudoObject type_object_for(RakudoObject MetaPackage)
+ public override RakudoObject type_object_for(ThreadContext TC, RakudoObject MetaPackage)
{
var STable = new SharedTable();
STable.HOW = MetaPackage;
@@ -42,7 +43,7 @@ public override RakudoObject type_object_for(RakudoObject MetaPackage)
///
///
///
- public override RakudoObject instance_of(RakudoObject WHAT)
+ public override RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT)
{
var Object = new Instance(WHAT.STable);
Object.Value = "";
@@ -54,62 +55,62 @@ public override RakudoObject instance_of(RakudoObject WHAT)
///
///
///
- public override bool defined(RakudoObject Obj)
+ public override bool defined(ThreadContext TC, RakudoObject Obj)
{
return ((Instance)Obj).Value != null;
}
- public override RakudoObject get_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name)
+ public override RakudoObject get_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override RakudoObject get_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
+ public override RakudoObject get_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override void bind_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
+ public override void bind_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
+ public override void bind_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
{
throw new InvalidOperationException("Boxed native types cannot store additional attributes.");
}
- public override int hint_for(RakudoObject ClassHandle, string Name)
+ public override int hint_for(ThreadContext TC, RakudoObject ClassHandle, string Name)
{
return Hints.NO_HINT;
}
- public override void set_int(RakudoObject Object, int Value)
+ public override void set_int(ThreadContext TC, RakudoObject Object, int Value)
{
throw new InvalidOperationException("This type of representation cannot box a native int");
}
- public override int get_int(RakudoObject Object)
+ public override int get_int(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native int");
}
- public override void set_num(RakudoObject Object, double Value)
+ public override void set_num(ThreadContext TC, RakudoObject Object, double Value)
{
throw new InvalidOperationException("This type of representation cannot box a native num");
}
- public override double get_num(RakudoObject Object)
+ public override double get_num(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native num");
}
- public override void set_str(RakudoObject Object, string Value)
+ public override void set_str(ThreadContext TC, RakudoObject Object, string Value)
{
((Instance)Object).Value = Value;
}
- public override string get_str(RakudoObject Object)
+ public override string get_str(ThreadContext TC, RakudoObject Object)
{
return ((Instance)Object).Value;
}
diff --git a/dotnet/runtime/Metamodel/Representations/RakudoCodeRef.cs b/dotnet/runtime/Metamodel/Representations/RakudoCodeRef.cs
index dcb732b..06c7694 100644
--- a/dotnet/runtime/Metamodel/Representations/RakudoCodeRef.cs
+++ b/dotnet/runtime/Metamodel/Representations/RakudoCodeRef.cs
@@ -54,7 +54,7 @@ public Instance(SharedTable STable)
///
///
///
- public override RakudoObject type_object_for(RakudoObject MetaPackage)
+ public override RakudoObject type_object_for(ThreadContext TC, RakudoObject MetaPackage)
{
// Do the usual bits of setup for the type-object.
var STable = new SharedTable();
@@ -64,8 +64,8 @@ public override RakudoObject type_object_for(RakudoObject MetaPackage)
// Also twiddle the S-Table's Invoke to invoke the contained
// function.
- STable.Invoke = (TC, Obj, Cap) =>
- ((RakudoCodeRef.Instance)Obj).Body(TC, Obj, Cap);
+ STable.Invoke = (TCi, Obj, Cap) =>
+ ((RakudoCodeRef.Instance)Obj).Body(TCi, Obj, Cap);
return STable.WHAT;
}
@@ -75,7 +75,7 @@ public override RakudoObject type_object_for(RakudoObject MetaPackage)
///
///
///
- public override RakudoObject instance_of(RakudoObject WHAT)
+ public override RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT)
{
var Object = new Instance(WHAT.STable);
return Object;
@@ -86,62 +86,62 @@ public override RakudoObject instance_of(RakudoObject WHAT)
///
///
///
- public override bool defined(RakudoObject Obj)
+ public override bool defined(ThreadContext TC, RakudoObject Obj)
{
return ((Instance)Obj).Body != null;
}
- public override RakudoObject get_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name)
+ public override RakudoObject get_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name)
{
throw new InvalidOperationException("RakudoCodeRef objects cannot store additional attributes.");
}
- public override RakudoObject get_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
+ public override RakudoObject get_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint)
{
throw new InvalidOperationException("RakudoCodeRef objects cannot store additional attributes.");
}
- public override void bind_attribute(RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
+ public override void bind_attribute(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, RakudoObject Value)
{
throw new InvalidOperationException("RakudoCodeRef objects cannot store additional attributes.");
}
- public override void bind_attribute_with_hint(RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
+ public override void bind_attribute_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject ClassHandle, string Name, int Hint, RakudoObject Value)
{
throw new InvalidOperationException("RakudoCodeRef objects cannot store additional attributes.");
}
- public override int hint_for(RakudoObject ClassHandle, string Name)
+ public override int hint_for(ThreadContext TC, RakudoObject ClassHandle, string Name)
{
return Hints.NO_HINT;
}
- public override void set_int(RakudoObject Object, int Value)
+ public override void set_int(ThreadContext TC, RakudoObject Object, int Value)
{
throw new InvalidOperationException("This type of representation cannot box a native int");
}
- public override int get_int(RakudoObject Object)
+ public override int get_int(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native int");
}
- public override void set_num(RakudoObject Object, double Value)
+ public override void set_num(ThreadContext TC, RakudoObject Object, double Value)
{
throw new InvalidOperationException("This type of representation cannot box a native num");
}
- public override double get_num(RakudoObject Object)
+ public override double get_num(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native num");
}
- public override void set_str(RakudoObject Object, string Value)
+ public override void set_str(ThreadContext TC, RakudoObject Object, string Value)
{
throw new InvalidOperationException("This type of representation cannot box a native string");
}
- public override string get_str(RakudoObject Object)
+ public override string get_str(ThreadContext TC, RakudoObject Object)
{
throw new InvalidOperationException("This type of representation cannot unbox to a native string");
}
diff --git a/dotnet/runtime/Runtime/CaptureHelper.cs b/dotnet/runtime/Runtime/CaptureHelper.cs
index a9504a2..95e3b9e 100644
--- a/dotnet/runtime/Runtime/CaptureHelper.cs
+++ b/dotnet/runtime/Runtime/CaptureHelper.cs
@@ -24,7 +24,7 @@ public static class CaptureHelper
///
public static RakudoObject FormWith()
{
- var C = (P6capture.Instance)CaptureTypeObject.STable.REPR.instance_of(CaptureTypeObject);
+ var C = (P6capture.Instance)CaptureTypeObject.STable.REPR.instance_of(null, CaptureTypeObject);
return C;
}
@@ -35,7 +35,7 @@ public static RakudoObject FormWith()
///
public static RakudoObject FormWith(RakudoObject[] PosArgs)
{
- var C = (P6capture.Instance)CaptureTypeObject.STable.REPR.instance_of(CaptureTypeObject);
+ var C = (P6capture.Instance)CaptureTypeObject.STable.REPR.instance_of(null, CaptureTypeObject);
C.Positionals = PosArgs;
return C;
}
@@ -47,7 +47,7 @@ public static RakudoObject FormWith(RakudoObject[] PosArgs)
///
public static RakudoObject FormWith(RakudoObject[] PosArgs, Dictionary NamedArgs)
{
- var C = (P6capture.Instance)CaptureTypeObject.STable.REPR.instance_of(CaptureTypeObject);
+ var C = (P6capture.Instance)CaptureTypeObject.STable.REPR.instance_of(null, CaptureTypeObject);
C.Positionals = PosArgs;
C.Nameds = NamedArgs;
return C;
diff --git a/dotnet/runtime/Runtime/CodeObjectUtility.cs b/dotnet/runtime/Runtime/CodeObjectUtility.cs
index 7014e4c..af1f76f 100644
--- a/dotnet/runtime/Runtime/CodeObjectUtility.cs
+++ b/dotnet/runtime/Runtime/CodeObjectUtility.cs
@@ -28,7 +28,7 @@ public static class CodeObjectUtility
public static RakudoObject WrapNativeMethod(Func Code)
{
var REPR = REPRRegistry.get_REPR_by_name("KnowHOWREPR");
- var Wrapper = REPR.type_object_for(null);
+ var Wrapper = REPR.type_object_for(null, null);
Wrapper.STable.Invoke = Code;
return Wrapper;
}
@@ -43,7 +43,7 @@ public static RakudoObject WrapNativeMethod(Func
public static RakudoObject type_object_for(ThreadContext TC, RakudoObject HOW, string REPRName)
{
- return REPRRegistry.get_REPR_by_name(REPRName).type_object_for(HOW);
+ return REPRRegistry.get_REPR_by_name(REPRName).type_object_for(TC, HOW);
}
///
@@ -31,7 +31,7 @@ public static RakudoObject type_object_for(ThreadContext TC, RakudoObject HOW, s
///
public static RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT)
{
- return WHAT.STable.REPR.instance_of(WHAT);
+ return WHAT.STable.REPR.instance_of(TC, WHAT);
}
///
@@ -41,7 +41,7 @@ public static RakudoObject instance_of(ThreadContext TC, RakudoObject WHAT)
///
public static bool repr_defined(ThreadContext TC, RakudoObject Obj)
{
- return Obj.STable.REPR.defined(Obj);
+ return Obj.STable.REPR.defined(TC, Obj);
}
///
@@ -53,7 +53,7 @@ public static bool repr_defined(ThreadContext TC, RakudoObject Obj)
///
public static RakudoObject get_attr(ThreadContext TC, RakudoObject Object, RakudoObject Class, string Name)
{
- return Object.STable.REPR.get_attribute(Object, Class, Name);
+ return Object.STable.REPR.get_attribute(TC, Object, Class, Name);
}
///
@@ -66,7 +66,7 @@ public static RakudoObject get_attr(ThreadContext TC, RakudoObject Object, Rakud
///
public static RakudoObject get_attr_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject Class, string Name, int Hint)
{
- return Object.STable.REPR.get_attribute_with_hint(Object, Class, Name, Hint);
+ return Object.STable.REPR.get_attribute_with_hint(TC, Object, Class, Name, Hint);
}
///
@@ -78,7 +78,7 @@ public static RakudoObject get_attr_with_hint(ThreadContext TC, RakudoObject Obj
///
public static void bind_attr_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject Class, string Name, RakudoObject Value)
{
- Object.STable.REPR.bind_attribute(Object, Class, Name, Value);
+ Object.STable.REPR.bind_attribute(TC, Object, Class, Name, Value);
}
///
@@ -91,7 +91,7 @@ public static void bind_attr_with_hint(ThreadContext TC, RakudoObject Object, Ra
///
public static void bind_attr_with_hint(ThreadContext TC, RakudoObject Object, RakudoObject Class, string Name, int Hint, RakudoObject Value)
{
- Object.STable.REPR.bind_attribute_with_hint(Object, Class, Name, Hint, Value);
+ Object.STable.REPR.bind_attribute_with_hint(TC, Object, Class, Name, Hint, Value);
}
///
@@ -156,8 +156,8 @@ public static RakudoObject get_what(ThreadContext TC, RakudoObject Obj)
public static RakudoObject box_int(ThreadContext TC, int Value, RakudoObject To)
{
var REPR = To.STable.REPR;
- var Result = REPR.instance_of(To);
- REPR.set_int(Result, Value);
+ var Result = REPR.instance_of(TC, To);
+ REPR.set_int(TC, Result, Value);
return Result;
}
@@ -169,8 +169,8 @@ public static RakudoObject box_int(ThreadContext TC, int Value, RakudoObject To)
public static RakudoObject box_num(ThreadContext TC, double Value, RakudoObject To)
{
var REPR = To.STable.REPR;
- var Result = REPR.instance_of(To);
- REPR.set_num(Result, Value);
+ var Result = REPR.instance_of(TC, To);
+ REPR.set_num(TC, Result, Value);
return Result;
}
@@ -182,8 +182,8 @@ public static RakudoObject box_num(ThreadContext TC, double Value, RakudoObject
public static RakudoObject box_str(ThreadContext TC, string Value, RakudoObject To)
{
var REPR = To.STable.REPR;
- var Result = REPR.instance_of(To);
- REPR.set_str(Result, Value);
+ var Result = REPR.instance_of(TC, To);
+ REPR.set_str(TC, Result, Value);
return Result;
}
@@ -194,7 +194,7 @@ public static RakudoObject box_str(ThreadContext TC, string Value, RakudoObject
///
public static int unbox_int(ThreadContext TC, RakudoObject Boxed)
{
- return Boxed.STable.REPR.get_int(Boxed);
+ return Boxed.STable.REPR.get_int(TC, Boxed);
}
///
@@ -204,7 +204,7 @@ public static int unbox_int(ThreadContext TC, RakudoObject Boxed)
///
public static double unbox_num(ThreadContext TC, RakudoObject Boxed)
{
- return Boxed.STable.REPR.get_num(Boxed);
+ return Boxed.STable.REPR.get_num(TC, Boxed);
}
///
@@ -214,7 +214,7 @@ public static double unbox_num(ThreadContext TC, RakudoObject Boxed)
///
public static string unbox_str(ThreadContext TC, RakudoObject Boxed)
{
- return Boxed.STable.REPR.get_str(Boxed);
+ return Boxed.STable.REPR.get_str(TC, Boxed);
}
///