@@ -34,9 +34,6 @@ public Arguments(NativeCall activation)
3434 NativeFunction f = activation .function ;
3535 calleeObj = f ;
3636
37- Scriptable topLevel = getTopLevelScope (parent );
38- constructor = getProperty (topLevel , "Object" );
39-
4037 int version = f .getLanguageVersion ();
4138 if (version <= Context .VERSION_1_3
4239 && version != Context .VERSION_DEFAULT )
@@ -164,9 +161,8 @@ public void delete(int index)
164161 Id_callee = 1 ,
165162 Id_length = 2 ,
166163 Id_caller = 3 ,
167- Id_constructor = 4 ,
168164
169- MAX_INSTANCE_ID = Id_constructor ;
165+ MAX_INSTANCE_ID = Id_caller ;
170166
171167 @ Override
172168 protected int getMaxInstanceId ()
@@ -187,7 +183,6 @@ protected int findInstanceIdInfo(String s)
187183 else if (c =='h' ) { X ="length" ;id =Id_length ; }
188184 else if (c =='r' ) { X ="caller" ;id =Id_caller ; }
189185 }
190- else if (s_length ==11 ) { X ="constructor" ;id =Id_constructor ; }
191186 if (X !=null && X !=s && !X .equals (s )) id = 0 ;
192187 break L0 ;
193188 }
@@ -198,10 +193,13 @@ protected int findInstanceIdInfo(String s)
198193 int attr ;
199194 switch (id ) {
200195 case Id_callee :
196+ attr = calleeAttr ;
197+ break ;
201198 case Id_caller :
199+ attr = callerAttr ;
200+ break ;
202201 case Id_length :
203- case Id_constructor :
204- attr = DONTENUM ;
202+ attr = lengthAttr ;
205203 break ;
206204 default : throw new IllegalStateException ();
207205 }
@@ -217,7 +215,6 @@ protected String getInstanceIdName(int id)
217215 case Id_callee : return "callee" ;
218216 case Id_length : return "length" ;
219217 case Id_caller : return "caller" ;
220- case Id_constructor : return "constructor" ;
221218 }
222219 return null ;
223220 }
@@ -239,8 +236,6 @@ else if (value == null) {
239236 }
240237 return value ;
241238 }
242- case Id_constructor :
243- return constructor ;
244239 }
245240 return super .getInstanceIdValue (id );
246241 }
@@ -254,11 +249,21 @@ protected void setInstanceIdValue(int id, Object value)
254249 case Id_caller :
255250 callerObj = (value != null ) ? value : UniqueTag .NULL_VALUE ;
256251 return ;
257- case Id_constructor : constructor = value ; return ;
258252 }
259253 super .setInstanceIdValue (id , value );
260254 }
261255
256+ @ Override
257+ protected void setInstanceIdAttributes (int id , int attr )
258+ {
259+ switch (id ) {
260+ case Id_callee : calleeAttr = attr ; return ;
261+ case Id_length : lengthAttr = attr ; return ;
262+ case Id_caller : callerAttr = attr ; return ;
263+ }
264+ super .setInstanceIdAttributes (id , attr );
265+ }
266+
262267 @ Override
263268 Object [] getIds (boolean getAll )
264269 {
@@ -364,7 +369,10 @@ protected void defineOwnProperty(Context cx, Object id,
364369 private Object callerObj ;
365370 private Object calleeObj ;
366371 private Object lengthObj ;
367- private Object constructor ;
372+
373+ private int callerAttr = DONTENUM ;
374+ private int calleeAttr = DONTENUM ;
375+ private int lengthAttr = DONTENUM ;
368376
369377 private NativeCall activation ;
370378
0 commit comments