File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,6 @@ class HLL::Compiler::SerializationContextBuilder {
47
47
# Address => slot mapping, so we can quickly look up existing objects
48
48
# in the context.
49
49
has % ! addr_to_slot ;
50
- sub addr ($ obj ) {
51
- pir::get_id__IP($ obj )
52
- }
53
50
54
51
# The event stream that builds or fixes up objects.
55
52
has @ ! event_stream ;
@@ -77,7 +74,7 @@ class HLL::Compiler::SerializationContextBuilder {
77
74
78
75
# Gets the slot for a given object. Dies if it is not in the context.
79
76
method slot_for_object ($ obj ) {
80
- my $ slot := % ! addr_to_slot {addr ($ obj )};
77
+ my $ slot := % ! addr_to_slot {nqp ::where ($ obj )};
81
78
unless pir:: defined ($ slot ) {
82
79
pir::die(' slot_for_object called on object not in context' );
83
80
}
@@ -126,15 +123,15 @@ class HLL::Compiler::SerializationContextBuilder {
126
123
pir::nqp_set_sc_for_object__vPP($ obj , $ ! sc );
127
124
my $ idx := $ ! sc . elems ();
128
125
$ ! sc [$ idx ] := $ obj ;
129
- % ! addr_to_slot {addr ($ obj )} := $ idx ;
126
+ % ! addr_to_slot {nqp ::where ($ obj )} := $ idx ;
130
127
$ idx
131
128
}
132
129
133
130
# Adds a code ref to the root set, along with a mapping.
134
131
method add_code ($ obj ) {
135
132
my $ idx := $ ! sc . elems ();
136
133
$ ! sc [$ idx ] := $ obj ;
137
- % ! addr_to_slot {addr ($ obj )} := $ idx ;
134
+ % ! addr_to_slot {nqp ::where ($ obj )} := $ idx ;
138
135
$ idx
139
136
}
140
137
You can’t perform that action at this time.
0 commit comments