@@ -26,14 +26,14 @@ globalContext.initialize(context => context.scs['__6MODEL_CORE__'] = core);
26
26
27
27
function addToScWithSt ( obj ) {
28
28
core . rootObjects . push ( obj ) ;
29
- core . rootSTables . push ( obj . _STable ) ;
29
+ core . rootSTables . push ( obj . $$STable ) ;
30
30
obj . _SC = core ;
31
- obj . _STable . _SC = core ;
31
+ obj . $$STable . _SC = core ;
32
32
}
33
33
34
34
/* Creates and installs the KnowHOWAttribute type. */
35
35
function createKnowHOWAttribute ( ) {
36
- const metaObj = KnowHowHOW . _STable . REPR . allocate ( KnowHowHOW . _STable ) ;
36
+ const metaObj = KnowHowHOW . $$STable . REPR . allocate ( KnowHowHOW . $$STable ) ;
37
37
38
38
const r = new reprs . KnowHOWAttribute ( ) ;
39
39
const typeObj = r . typeObjectFor ( metaObj ) ;
@@ -43,19 +43,19 @@ function createKnowHOWAttribute() {
43
43
return new NQPStr ( self . __name ) ;
44
44
} ;
45
45
methods [ 'new' ] = function ( ctx , _NAMED , self ) {
46
- const attr = r . allocate ( self . _STable ) ;
46
+ const attr = r . allocate ( self . $$STable ) ;
47
47
attr . __name = _NAMED . name . $$getStr ( ) ;
48
48
attr . __type = _NAMED . type ;
49
49
attr . __boxTarget = _NAMED . box_target ? _NAMED . box_target . $$getInt ( ) : 0 ;
50
50
return attr ;
51
51
} ;
52
52
53
- typeObj . _STable . methodCache = new Map ( ) ;
54
- typeObj . _STable . modeFlags = constants . METHOD_CACHE_AUTHORITATIVE ;
53
+ typeObj . $$STable . methodCache = new Map ( ) ;
54
+ typeObj . $$STable . modeFlags = constants . METHOD_CACHE_AUTHORITATIVE ;
55
55
56
56
for ( const method of Object . keys ( methods ) ) {
57
- typeObj . _STable . ObjConstructor . prototype [ method ] = methods [ method ] ;
58
- typeObj . _STable . methodCache . set ( method , wrapMethod ( method , methods [ method ] ) ) ;
57
+ typeObj . $$STable . ObjConstructor . prototype [ method ] = methods [ method ] ;
58
+ typeObj . $$STable . methodCache . set ( method , wrapMethod ( method , methods [ method ] ) ) ;
59
59
}
60
60
61
61
return typeObj ;
@@ -74,12 +74,12 @@ KnowHowHOW.__name = 'KnowHOW';
74
74
75
75
addToScWithSt ( KnowHowHOW ) ;
76
76
77
- KnowHOW . _STable . HOW = KnowHowHOW ;
77
+ KnowHOW . $$STable . HOW = KnowHowHOW ;
78
78
79
- KnowHOW . _STable . methodCache = new Map ( ) ;
80
- KnowHOW . _STable . modeFlags = constants . METHOD_CACHE_AUTHORITATIVE ;
81
- KnowHowHOW . _STable . methodCache = new Map ( ) ;
82
- KnowHowHOW . _STable . modeFlags = constants . METHOD_CACHE_AUTHORITATIVE ;
79
+ KnowHOW . $$STable . methodCache = new Map ( ) ;
80
+ KnowHOW . $$STable . modeFlags = constants . METHOD_CACHE_AUTHORITATIVE ;
81
+ KnowHowHOW . $$STable . methodCache = new Map ( ) ;
82
+ KnowHowHOW . $$STable . modeFlags = constants . METHOD_CACHE_AUTHORITATIVE ;
83
83
84
84
function wrapMethod ( name , method ) {
85
85
const codeRef = new CodeRef ( name , undefined ) ;
@@ -89,12 +89,12 @@ function wrapMethod(name, method) {
89
89
function addKnowhowHowMethod ( name , method ) {
90
90
/* TODO - think if setting the object cache would be better */
91
91
92
- KnowHowHOW . _STable . ObjConstructor . prototype [ name ] = method ;
93
- KnowHOW . _STable . ObjConstructor . prototype [ name ] = method ;
92
+ KnowHowHOW . $$STable . ObjConstructor . prototype [ name ] = method ;
93
+ KnowHOW . $$STable . ObjConstructor . prototype [ name ] = method ;
94
94
95
95
const wrapped = wrapMethod ( name , method ) ;
96
- KnowHOW . _STable . methodCache . set ( name , wrapped ) ;
97
- KnowHowHOW . _STable . methodCache . set ( name , wrapped ) ;
96
+ KnowHOW . $$STable . methodCache . set ( name , wrapped ) ;
97
+ KnowHowHOW . $$STable . methodCache . set ( name , wrapped ) ;
98
98
}
99
99
100
100
addKnowhowHowMethod ( 'name' , function ( ctx , _NAMED , self ) {
@@ -111,7 +111,7 @@ addKnowhowHowMethod('methods', function(ctx, _NAMED, self) {
111
111
112
112
addKnowhowHowMethod ( 'new_type' , function ( ctx , _NAMED , self ) {
113
113
/* We first create a new HOW instance. */
114
- const HOW = self . _STable . REPR . allocate ( self . _STable ) ;
114
+ const HOW = self . $$STable . REPR . allocate ( self . $$STable ) ;
115
115
116
116
/* See if we have a representation name; if not default to P6opaque. */
117
117
const reprName = ( _NAMED && _NAMED . repr ) ? _NAMED . repr . $$getStr ( ) : 'P6opaque' ;
@@ -129,7 +129,7 @@ addKnowhowHowMethod('new_type', function(ctx, _NAMED, self) {
129
129
}
130
130
131
131
/* Set .WHO to an empty hash. */
132
- typeObject . _STable . WHO = new Hash ( ) ;
132
+ typeObject . $$STable . WHO = new Hash ( ) ;
133
133
134
134
return typeObject ;
135
135
} ) ;
@@ -144,12 +144,12 @@ addKnowhowHowMethod('add_method', function(ctx, _NAMED, self, type, name, code)
144
144
145
145
addKnowhowHowMethod ( 'compose' , function ( ctx , _NAMED , self , typeObject ) {
146
146
/* Set method cache */
147
- typeObject . _STable . setMethodCache ( self . __methods . content ) ;
148
- typeObject . _STable . modeFlags = constants . METHOD_CACHE_AUTHORITATIVE ;
147
+ typeObject . $$STable . setMethodCache ( self . __methods . content ) ;
148
+ typeObject . $$STable . modeFlags = constants . METHOD_CACHE_AUTHORITATIVE ;
149
149
150
150
/* Set type check cache. */
151
151
152
- typeObject . _STable . typeCheckCache = [ typeObject ] ;
152
+ typeObject . $$STable . typeCheckCache = [ typeObject ] ;
153
153
154
154
/* Use any attribute information to produce attribute protocol
155
155
* data. The protocol consists of an array... */
@@ -188,7 +188,7 @@ addKnowhowHowMethod('compose', function(ctx, _NAMED, self, typeObject) {
188
188
189
189
190
190
/* Compose the representation using it. */
191
- typeObject . _STable . REPR . compose ( typeObject . _STable , reprInfoHash ) ;
191
+ typeObject . $$STable . REPR . compose ( typeObject . $$STable , reprInfoHash ) ;
192
192
193
193
return typeInfo ;
194
194
} ) ;
@@ -205,7 +205,7 @@ module.exports.knowhowattr = KnowHOWAttribute;
205
205
addToScWithSt ( KnowHOWAttribute ) ;
206
206
207
207
function bootType ( typeName , reprName ) {
208
- const metaObj = KnowHowHOW . _STable . REPR . allocate ( KnowHowHOW . _STable ) ;
208
+ const metaObj = KnowHowHOW . $$STable . REPR . allocate ( KnowHowHOW . $$STable ) ;
209
209
metaObj . __name = typeName ;
210
210
211
211
const typeObj = ( new reprs [ reprName ] ) . typeObjectFor ( metaObj ) ;
@@ -220,15 +220,15 @@ function bootType(typeName, reprName) {
220
220
221
221
function bootArray ( type ) {
222
222
const array = bootType ( 'BOOTArray' , 'VMArray' ) ;
223
- array . _STable . REPR . type = Null ;
224
- array . _STable . REPR . primType = type ;
225
- array . _STable . REPR . setupSTableWhenComposed ( array . _STable ) ;
226
- array . _STable . setboolspec ( 8 , Null ) ;
223
+ array . $$STable . REPR . type = Null ;
224
+ array . $$STable . REPR . primType = type ;
225
+ array . $$STable . REPR . setupSTableWhenComposed ( array . $$STable ) ;
226
+ array . $$STable . setboolspec ( 8 , Null ) ;
227
227
return array ;
228
228
}
229
229
230
230
BOOT . Array = bootArray ( 0 ) ;
231
- BOOT . Array . _STable . hllRole = 4 ;
231
+ BOOT . Array . $$STable . hllRole = 4 ;
232
232
233
233
BOOT . IntArray = bootArray ( 1 ) ;
234
234
BOOT . NumArray = bootArray ( 2 ) ;
0 commit comments