@@ -3613,25 +3613,32 @@ else if (agg.st.REPR instanceof ContextRef) {
3613
3613
SixModelObject BOOTHash = tc .gc .BOOTHash ;
3614
3614
SixModelObject hash = BOOTHash .st .REPR .allocate (tc , BOOTHash .st );
3615
3615
3616
- /* TODO: don't cheat and just shove the nulls in. It's enough for
3617
- * the initial use case of this, though.
3618
- */
3619
3616
StaticCodeInfo sci = ((ContextRefInstance )agg ).context .codeRef .staticInfo ;
3620
3617
if (sci .oLexicalNames != null ) {
3621
3618
for (int i = 0 ; i < sci .oLexicalNames .length ; i ++)
3622
- hash .bind_key_boxed (tc , sci .oLexicalNames [i ], null );
3619
+ hash .bind_key_boxed (tc , sci .oLexicalNames [i ],
3620
+ ((ContextRefInstance )agg ).at_key_boxed (tc , sci .oLexicalNames [i ]));
3623
3621
}
3624
3622
if (sci .iLexicalNames != null ) {
3625
- for (int i = 0 ; i < sci .iLexicalNames .length ; i ++)
3626
- hash .bind_key_boxed (tc , sci .iLexicalNames [i ], null );
3623
+ for (int i = 0 ; i < sci .iLexicalNames .length ; i ++) {
3624
+ ((ContextRefInstance )agg ).at_key_boxed (tc , sci .iLexicalNames [i ]);
3625
+ hash .bind_key_boxed (tc , sci .iLexicalNames [i ],
3626
+ box_i (tc .native_i , ((ContextRefInstance )agg ).context .codeRef .staticInfo .compUnit .hllConfig .intBoxType , tc ));
3627
+ }
3627
3628
}
3628
3629
if (sci .nLexicalNames != null ) {
3629
- for (int i = 0 ; i < sci .nLexicalNames .length ; i ++)
3630
- hash .bind_key_boxed (tc , sci .nLexicalNames [i ], null );
3630
+ for (int i = 0 ; i < sci .nLexicalNames .length ; i ++) {
3631
+ ((ContextRefInstance )agg ).at_key_boxed (tc , sci .nLexicalNames [i ]);
3632
+ hash .bind_key_boxed (tc , sci .nLexicalNames [i ],
3633
+ box_n (tc .native_n , ((ContextRefInstance )agg ).context .codeRef .staticInfo .compUnit .hllConfig .numBoxType , tc ));
3634
+ }
3631
3635
}
3632
3636
if (sci .sLexicalNames != null ) {
3633
- for (int i = 0 ; i < sci .sLexicalNames .length ; i ++)
3634
- hash .bind_key_boxed (tc , sci .sLexicalNames [i ], null );
3637
+ for (int i = 0 ; i < sci .sLexicalNames .length ; i ++) {
3638
+ ((ContextRefInstance )agg ).at_key_boxed (tc , sci .sLexicalNames [i ]);
3639
+ hash .bind_key_boxed (tc , sci .sLexicalNames [i ],
3640
+ box_s (tc .native_s , ((ContextRefInstance )agg ).context .codeRef .staticInfo .compUnit .hllConfig .strBoxType , tc ));
3641
+ }
3635
3642
}
3636
3643
3637
3644
return iter (hash , tc );
0 commit comments