@@ -43,16 +43,10 @@ class HLL::World {
43
43
# or between compile time and run time.
44
44
has @ ! fixup_tasks ;
45
45
46
- # Address => slot mapping, so we can quickly look up existing objects
47
- # in the context.
48
- # XXX LEGACY
49
- has % ! addr_to_slot ;
50
-
51
46
method BUILD (: $ handle ! , : $ description = ' <unknown>' ) {
52
47
# Initialize attributes.
53
48
$ ! sc := nqp ::createsc($ handle );
54
49
$ ! handle := $ handle ;
55
- % ! addr_to_slot := nqp ::hash();
56
50
@ ! fixup_tasks := nqp ::list();
57
51
@ ! load_dependency_tasks := nqp ::list();
58
52
$ ! precomp_mode := % * COMPILING <%?OPTIONS ><precomp >;
@@ -63,22 +57,12 @@ class HLL::World {
63
57
# Add to currently compiling SC stack.
64
58
nqp ::pushcompsc($ ! sc );
65
59
}
66
-
67
- # Gets the slot for a given object. Dies if it is not in the context.
68
- method slot_for_object ($ obj ) {
69
- my $ slot := % ! addr_to_slot {nqp ::where($ obj )};
70
- unless nqp :: defined ($ slot ) {
71
- nqp ::die(' slot_for_object called on object not in context' );
72
- }
73
- $ slot
74
- }
75
60
76
61
# Adds an object to the root set, along with a mapping.
77
62
method add_object ($ obj ) {
78
63
nqp ::setobjsc($ obj , $ ! sc );
79
64
my $ idx := nqp ::scobjcount($ ! sc );
80
65
nqp ::scsetobj($ ! sc , $ idx , $ obj );
81
- % ! addr_to_slot {nqp ::where($ obj )} := $ idx ;
82
66
$ idx
83
67
}
84
68
0 commit comments