diff --git a/js/rhino/src/org/mozilla/javascript/FunctionNode.java b/js/rhino/src/org/mozilla/javascript/FunctionNode.java index d6cf58f48673..f052de8af620 100644 --- a/js/rhino/src/org/mozilla/javascript/FunctionNode.java +++ b/js/rhino/src/org/mozilla/javascript/FunctionNode.java @@ -53,18 +53,10 @@ public class FunctionNode extends ScriptOrFnNode { return itsNeedsActivation; } - void setRequiresActivation() { - itsNeedsActivation = true; - } - public boolean getIgnoreDynamicScope() { return itsIgnoreDynamicScope; } - void setIgnoreDynamicScope() { - itsIgnoreDynamicScope = true; - } - /** * There are three types of functions that can be defined. The first * is a function statement. This is a function appearing as a top-level @@ -88,12 +80,8 @@ public class FunctionNode extends ScriptOrFnNode { return itsFunctionType; } - void setFunctionType(int functionType) { - itsFunctionType = functionType; - } - - private String functionName; - private boolean itsNeedsActivation; - private int itsFunctionType; - private boolean itsIgnoreDynamicScope; + String functionName; + boolean itsNeedsActivation; + int itsFunctionType; + boolean itsIgnoreDynamicScope; } diff --git a/js/rhino/src/org/mozilla/javascript/IRFactory.java b/js/rhino/src/org/mozilla/javascript/IRFactory.java index 06bdf2c0fe53..fe416dd4ad21 100644 --- a/js/rhino/src/org/mozilla/javascript/IRFactory.java +++ b/js/rhino/src/org/mozilla/javascript/IRFactory.java @@ -394,13 +394,13 @@ final class IRFactory Node initFunction(FunctionNode fnNode, int functionIndex, Node statements, int functionType) { - fnNode.setFunctionType(functionType); + fnNode.itsFunctionType = functionType; fnNode.addChildToBack(statements); int functionCount = fnNode.getFunctionCount(); if (functionCount != 0) { // Functions containing other functions require activation objects - fnNode.setRequiresActivation(); + fnNode.itsNeedsActivation = true; for (int i = 0; i != functionCount; ++i) { FunctionNode fn = fnNode.getFunctionNode(i); // nested function expression statements overrides var @@ -1422,7 +1422,7 @@ final class IRFactory private void setRequiresActivation() { if (parser.insideFunction()) { - ((FunctionNode)parser.currentScriptOrFn).setRequiresActivation(); + ((FunctionNode)parser.currentScriptOrFn).itsNeedsActivation = true; } }