equal
deleted
inserted
replaced
36 import jdk.internal.dynalink.CallSiteDescriptor; |
36 import jdk.internal.dynalink.CallSiteDescriptor; |
37 import jdk.internal.dynalink.linker.GuardedInvocation; |
37 import jdk.internal.dynalink.linker.GuardedInvocation; |
38 import jdk.internal.dynalink.linker.LinkRequest; |
38 import jdk.internal.dynalink.linker.LinkRequest; |
39 import jdk.nashorn.internal.codegen.CompilerConstants.Call; |
39 import jdk.nashorn.internal.codegen.CompilerConstants.Call; |
40 import jdk.nashorn.internal.lookup.MethodHandleFactory; |
40 import jdk.nashorn.internal.lookup.MethodHandleFactory; |
|
41 import jdk.nashorn.internal.objects.Global; |
41 import jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor; |
42 import jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor; |
42 import jdk.nashorn.internal.runtime.linker.NashornGuards; |
43 import jdk.nashorn.internal.runtime.linker.NashornGuards; |
43 |
44 |
44 /** |
45 /** |
45 * Runtime representation of a JavaScript function. |
46 * Runtime representation of a JavaScript function. |
473 @SuppressWarnings("unused") |
474 @SuppressWarnings("unused") |
474 private static Object wrapFilter(final Object obj) { |
475 private static Object wrapFilter(final Object obj) { |
475 if (obj instanceof ScriptObject || !ScriptFunctionData.isPrimitiveThis(obj)) { |
476 if (obj instanceof ScriptObject || !ScriptFunctionData.isPrimitiveThis(obj)) { |
476 return obj; |
477 return obj; |
477 } |
478 } |
478 return ((GlobalObject)Context.getGlobalTrusted()).wrapAsObject(obj); |
479 return Context.getGlobal().wrapAsObject(obj); |
479 } |
480 } |
480 |
481 |
481 |
482 |
482 @SuppressWarnings("unused") |
483 @SuppressWarnings("unused") |
483 private static Object globalFilter(final Object object) { |
484 private static Object globalFilter(final Object object) { |
484 // replace whatever we get with the current global object |
485 // replace whatever we get with the current global object |
485 return Context.getGlobalTrusted(); |
486 return Context.getGlobal(); |
486 } |
487 } |
487 |
488 |
488 /** |
489 /** |
489 * dyn:call call site signature: (callee, thiz, [args...]) |
490 * dyn:call call site signature: (callee, thiz, [args...]) |
490 * generated method signature: (callee, thiz, [args...]) |
491 * generated method signature: (callee, thiz, [args...]) |