equal
deleted
inserted
replaced
66 |
66 |
67 static { |
67 static { |
68 final ArrayList<Property> properties = new ArrayList<>(2); |
68 final ArrayList<Property> properties = new ArrayList<>(2); |
69 properties.add(AccessorProperty.create("length", Property.NOT_ENUMERABLE, G$LENGTH, S$LENGTH)); |
69 properties.add(AccessorProperty.create("length", Property.NOT_ENUMERABLE, G$LENGTH, S$LENGTH)); |
70 properties.add(AccessorProperty.create("callee", Property.NOT_ENUMERABLE, G$CALLEE, S$CALLEE)); |
70 properties.add(AccessorProperty.create("callee", Property.NOT_ENUMERABLE, G$CALLEE, S$CALLEE)); |
71 map$ = PropertyMap.newMap(properties).setIsShared(); |
71 map$ = PropertyMap.newMap(properties); |
72 } |
72 } |
73 |
73 |
74 static PropertyMap getInitialMap() { |
74 static PropertyMap getInitialMap() { |
75 return map$; |
75 return map$; |
76 } |
76 } |
265 // Strict functions won't always have a callee for arguments, and will pass null instead. |
265 // Strict functions won't always have a callee for arguments, and will pass null instead. |
266 final boolean isStrict = callee == null || callee.isStrict(); |
266 final boolean isStrict = callee == null || callee.isStrict(); |
267 final Global global = Global.instance(); |
267 final Global global = Global.instance(); |
268 final ScriptObject proto = global.getObjectPrototype(); |
268 final ScriptObject proto = global.getObjectPrototype(); |
269 if (isStrict) { |
269 if (isStrict) { |
270 return new NativeStrictArguments(arguments, numParams, proto, global.getStrictArgumentsMap()); |
270 return new NativeStrictArguments(arguments, numParams, proto, NativeStrictArguments.getInitialMap()); |
271 } |
271 } |
272 return new NativeArguments(arguments, callee, numParams, proto, global.getArgumentsMap()); |
272 return new NativeArguments(arguments, callee, numParams, proto, NativeArguments.getInitialMap()); |
273 } |
273 } |
274 |
274 |
275 /** |
275 /** |
276 * Length getter |
276 * Length getter |
277 * @param self self reference |
277 * @param self self reference |