equal
deleted
inserted
replaced
1935 final String name = desc.getNameToken(2); |
1935 final String name = desc.getNameToken(2); |
1936 final FindProperty find = findProperty(NO_SUCH_METHOD_NAME, true); |
1936 final FindProperty find = findProperty(NO_SUCH_METHOD_NAME, true); |
1937 final boolean scopeCall = isScope() && NashornCallSiteDescriptor.isScope(desc); |
1937 final boolean scopeCall = isScope() && NashornCallSiteDescriptor.isScope(desc); |
1938 |
1938 |
1939 if (find == null) { |
1939 if (find == null) { |
1940 if (scopeCall) { |
1940 return noSuchProperty(desc, request); |
1941 ECMAErrors.referenceError("not.defined", name); |
|
1942 throw new AssertionError(); // never reached |
|
1943 } |
|
1944 return createEmptyGetter(desc, name); |
|
1945 } |
1941 } |
1946 |
1942 |
1947 final ScriptFunction func = (ScriptFunction)getObjectValue(find); |
1943 final ScriptFunction func = (ScriptFunction)getObjectValue(find); |
1948 final Object thiz = scopeCall && func.isStrict() ? ScriptRuntime.UNDEFINED : this; |
1944 final Object thiz = scopeCall && func.isStrict() ? ScriptRuntime.UNDEFINED : this; |
1949 // TODO: It'd be awesome if we could bind "name" without binding "this". |
1945 // TODO: It'd be awesome if we could bind "name" without binding "this". |
3333 |
3329 |
3334 return false; |
3330 return false; |
3335 } |
3331 } |
3336 |
3332 |
3337 /** This is updated only in debug mode - counts number of {@code ScriptObject} instances created */ |
3333 /** This is updated only in debug mode - counts number of {@code ScriptObject} instances created */ |
3338 protected static int count; |
3334 private static int count; |
3339 |
3335 |
3340 /** This is updated only in debug mode - counts number of {@code ScriptObject} instances created that are scope */ |
3336 /** This is updated only in debug mode - counts number of {@code ScriptObject} instances created that are scope */ |
3341 protected static int scopeCount; |
3337 private static int scopeCount; |
3342 |
3338 |
3343 /** |
3339 /** |
3344 * Get number of {@code ScriptObject} instances created. If not running in debug |
3340 * Get number of {@code ScriptObject} instances created. If not running in debug |
3345 * mode this is always 0 |
3341 * mode this is always 0 |
3346 * |
3342 * |