< prev index next >
src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java
Print this page
*** 85,95 ****
/**
* Representation of global scope.
*/
@ScriptClass("Global")
! public final class Global extends ScriptObject implements Scope {
// Placeholder value used in place of a location property (__FILE__, __DIR__, __LINE__)
private static final Object LOCATION_PROPERTY_PLACEHOLDER = new Object();
private final InvokeByName TO_STRING = new InvokeByName("toString", ScriptObject.class);
private final InvokeByName VALUE_OF = new InvokeByName("valueOf", ScriptObject.class);
--- 85,95 ----
/**
* Representation of global scope.
*/
@ScriptClass("Global")
! public final class Global extends Scope {
// Placeholder value used in place of a location property (__FILE__, __DIR__, __LINE__)
private static final Object LOCATION_PROPERTY_PLACEHOLDER = new Object();
private final InvokeByName TO_STRING = new InvokeByName("toString", ScriptObject.class);
private final InvokeByName VALUE_OF = new InvokeByName("valueOf", ScriptObject.class);
*** 904,916 ****
/*
* ECMA section 13.2.3 The [[ThrowTypeError]] Function Object
*/
private ScriptFunction typeErrorThrower;
- // Flag to indicate that a split method issued a return statement
- private int splitState = -1;
-
// Used to store the last RegExp result to support deprecated RegExp constructor properties
private RegExpResult lastRegExpResult;
private static final MethodHandle EVAL = findOwnMH_S("eval", Object.class, Object.class, Object.class);
private static final MethodHandle NO_SUCH_PROPERTY = findOwnMH_S(NO_SUCH_PROPERTY_NAME, Object.class, Object.class, Object.class);
--- 904,913 ----
*** 993,1003 ****
* @param context the context
*/
public Global(final Context context) {
super(checkAndGetMap(context));
this.context = context;
- this.setIsScope();
this.lexicalScope = context.getEnv()._es6 ? new LexicalScope(this) : null;
}
/**
* Script access to "current" Global instance
--- 990,999 ----
*** 2353,2382 ****
throw typeError("not.an.object", ScriptRuntime.safeToString(obj));
}
}
/**
- * Get the current split state.
- *
- * @return current split state
- */
- @Override
- public int getSplitState() {
- return splitState;
- }
-
- /**
- * Set the current split state.
- *
- * @param state current split state
- */
- @Override
- public void setSplitState(final int state) {
- splitState = state;
- }
-
- /**
* Return the ES6 global scope for lexically declared bindings.
* @return the ES6 lexical global scope.
*/
public final ScriptObject getLexicalScope() {
assert context.getEnv()._es6;
--- 2349,2358 ----
< prev index next >