Skip to content

Commit

Permalink
[java] sync the latest P6opaque slot allocation change from dotnet
Browse files Browse the repository at this point in the history
  • Loading branch information
mberends committed Oct 2, 2010
1 parent 2947a00 commit 1c5881f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions java/runtime/Rakudo/Metamodel/Representations/P6opaque.java
Expand Up @@ -262,7 +262,6 @@ public String get_str(ThreadContext tc, RakudoObject object)
}
private void ComputeSlotAllocation(ThreadContext tc, RakudoObject WHAT)
{
RakudoObject HOW = WHAT.getSTable().HOW;

// Allocate slot mapping table.
SlotAllocation = new HashMap<RakudoObject, HashMap<String, Integer>>();
Expand All @@ -273,11 +272,12 @@ private void ComputeSlotAllocation(ThreadContext tc, RakudoObject WHAT)
while (currentClass != null)
{
// Get attributes and iterate over them.
RakudoObject HOW = currentClass.getSTable().HOW;
RakudoObject AttributesMeth = HOW.getSTable().FindMethod.FindMethod(tc, HOW, "attributes", Hints.NO_HINT);
HashMap<String, RakudoObject> localBoxInt1 = new HashMap<String, RakudoObject>();
localBoxInt1.put("local", Ops.box_int(tc, 1, tc.DefaultBoolBoxType));
RakudoObject Attributes = AttributesMeth.getSTable().Invoke.Invoke(tc, AttributesMeth, CaptureHelper.FormWith(
new RakudoObject[] { HOW, WHAT },
new RakudoObject[] { HOW, currentClass },
localBoxInt1)); // new HashMap<String, RakudoObject>() { { "local", Ops.box_int(tc, 1, tc.DefaultBoolBoxType) } }));
RakudoObject AttributesElemsMeth = Attributes.getSTable().FindMethod.FindMethod(tc, Attributes, "elems", Hints.NO_HINT);
int AttributesElems = Ops.unbox_int(tc, AttributesElemsMeth.getSTable().Invoke.Invoke(tc, AttributesElemsMeth,
Expand All @@ -304,7 +304,7 @@ private void ComputeSlotAllocation(ThreadContext tc, RakudoObject WHAT)
HashMap<String,RakudoObject> localBoxInt2 = new HashMap<String,RakudoObject>();
localBoxInt2.put("local", Ops.box_int(tc, 1, tc.DefaultBoolBoxType));
RakudoObject Parents = ParentsMeth.getSTable().Invoke.Invoke(tc, ParentsMeth, CaptureHelper.FormWith(
new RakudoObject[] { HOW, WHAT },
new RakudoObject[] { HOW, currentClass },
localBoxInt2)); // new HashMap<String,RakudoObject>() { { "local", Ops.box_int(tc, 1, tc.DefaultBoolBoxType) } }));
// Check how many parents we have.
RakudoObject ParentElemsMeth = Parents.getSTable().FindMethod.FindMethod(tc, Parents, "elems", Hints.NO_HINT);
Expand Down

0 comments on commit 1c5881f

Please sign in to comment.