Changeset 215984 in webkit


Ignore:
Timestamp:
Apr 30, 2017, 1:06:23 AM (8 years ago)
Author:
gskachkov@gmail.com
Message:

[ES6]. Implement Annex B.3.3 function hoisting rules for eval
https://bugs.webkit.org/show_bug.cgi?id=163208

Reviewed by Saam Barati.

JSTests:

  • stress/eval-func-decl-block-scoping-reassign.js: Added.

(assert):
(throw.new.Error.f):
(throw.new.Error):

  • stress/eval-func-decl-block-with-remove.js: Added.

(assert):
(foo.boo):
(foo):

  • stress/eval-func-decl-block-with-var-and-remove.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(joo):
(koo):

  • stress/eval-func-decl-block-with-var-sinthesize.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(hoo):
(joo):
(koo):

  • stress/eval-func-decl-in-block-scope-and-bind-to-top-eval-scope.js: Added.
  • stress/eval-func-decl-in-eval-within-block-with-let.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(goo):

  • stress/eval-func-decl-in-eval-within-with-scope.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(boo.let.val2):
(boo.let.val3):

  • stress/eval-func-decl-in-frozen-global.js: Added.

(assert):
(assertThrow):
(throw.new.Error):
(Object.freeze):

  • stress/eval-func-decl-in-global-of-eval.js: Added.

(assert):
(assertThrow):
(bar):
(baz):
(foobar):

  • stress/eval-func-decl-in-global.js: Added.

(assert):
(assertThrow):

  • stress/eval-func-decl-in-if.js: Added.

(assert):

  • stress/eval-func-decl-within-eval-with-reassign-to-var.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(foobar):
(hoo):
(joo):
(koo):
(loo):

  • stress/eval-func-decl-within-eval-without-reassign-to-let.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(goo):

  • stress/variable-under-tdz-eval-tricky.js:

(assert):

  • test262.yaml:

Source/JavaScriptCore:

Current patch implements Annex B.3.3 that is related to
hoisting of function declaration in eval.
https://tc39.github.io/ecma262/#sec-web-compat-evaldeclarationinstantiation
Function declaration in eval should create variable with
function name in function scope where eval is invoked
or bind to variable if it declared outside of the eval.
If variable is created it can be removed by 'delete a;' command.
If eval is invoke in block scope that contains let/const
variable with the same name as function declaration
we do not bind. This patch leads to the following behavior:

function foo() {

{

print(boo); undefined
eval('{ function boo() {}}');
print(boo);
function boo() {}

}
print(boo); function boo() {}

}

function foobar() {

{

let boo = 10;
print(boo); 10;
eval('{ function boo() {}}');
print(boo);
10;

}
print(boo) 10

}

function bar() {

{

var boo = 10;
print(boo); 10
eval('{ function boo() {} }');
print(boo);
function boo() {}

}
print(boo); function boo() {}

}

function bas() {

{

let boo = 10;
eval(' { function boo() {} } ');
print(boo); 10

}
print(boo); Reference Error

}

Current implementation relies on already implemented
'hoist function in sloppy mode' feature, with small changes.
In short it works in following way: during hoisting of function
with name S in eval, we are looking for first scope that
contains space for variable with name S and if this scope
has var type we bind function there

To implement this feature was added bytecode ops:
op_resolve_scope_for_hoisting_func_decl_in_eval - get variable scope
or return undefined if variable can't be binded there.

There is a corner case, hoist function in eval within catch block,
that is not covered by this patch, and will be fixed in
https://bugs.webkit.org/show_bug.cgi?id=168184

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::dumpBytecode):

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finalizeLLIntInlineCaches):

  • bytecode/EvalCodeBlock.h:

(JSC::EvalCodeBlock::functionHoistingCandidate):
(JSC::EvalCodeBlock::numFunctionHoistingCandidates):

  • bytecode/UnlinkedEvalCodeBlock.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::hoistSloppyModeFunctionIfNecessary):
(JSC::BytecodeGenerator::emitResolveScopeForHoistingFuncDeclInEval):

  • bytecompiler/BytecodeGenerator.h:
  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasIdentifier):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileResolveScopeForHoistingFuncDeclInEval):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileResolveScopeForHoistingFuncDeclInEval):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval):

  • llint/LowLevelInterpreter.asm:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseFunctionDeclarationStatement):

  • parser/Parser.h:

(JSC::Scope::getSloppyModeHoistedFunctions):
(JSC::Parser::declareFunction):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:
  • runtime/EvalExecutable.h:

(JSC::EvalExecutable::numFunctionHoistingCandidates):
(JSC::EvalExecutable::numTopLevelFunctionDecls):
(JSC::EvalExecutable::numberOfFunctionDecls): Deleted.

  • runtime/JSScope.cpp:

(JSC::JSScope::resolve):
(JSC::JSScope::resolveScopeForHoistingFuncDeclInEval):

  • runtime/JSScope.h:

LayoutTests:

  • inspector/runtime/evaluate-CommandLineAPI-expected.txt:
  • inspector/runtime/evaluate-CommandLineAPI.html:
  • js/parser-syntax-check-expected.txt:
  • js/script-tests/parser-syntax-check.js:
Location:
trunk
Files:
13 added
49 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r215919 r215984  
     12017-04-30  Oleksandr Skachkov  <gskachkov@gmail.com>
     2
     3        [ES6]. Implement Annex B.3.3 function hoisting rules for eval
     4        https://bugs.webkit.org/show_bug.cgi?id=163208
     5
     6        Reviewed by Saam Barati.
     7
     8        * stress/eval-func-decl-block-scoping-reassign.js: Added.
     9        (assert):
     10        (throw.new.Error.f):
     11        (throw.new.Error):
     12        * stress/eval-func-decl-block-with-remove.js: Added.
     13        (assert):
     14        (foo.boo):
     15        (foo):
     16        * stress/eval-func-decl-block-with-var-and-remove.js: Added.
     17        (assert):
     18        (assertThrow):
     19        (foo):
     20        (boo):
     21        (joo):
     22        (koo):
     23        * stress/eval-func-decl-block-with-var-sinthesize.js: Added.
     24        (assert):
     25        (assertThrow):
     26        (foo):
     27        (boo):
     28        (hoo):
     29        (joo):
     30        (koo):
     31        * stress/eval-func-decl-in-block-scope-and-bind-to-top-eval-scope.js: Added.
     32        * stress/eval-func-decl-in-eval-within-block-with-let.js: Added.
     33        (assert):
     34        (assertThrow):
     35        (foo):
     36        (boo):
     37        (goo):
     38        * stress/eval-func-decl-in-eval-within-with-scope.js: Added.
     39        (assert):
     40        (assertThrow):
     41        (foo):
     42        (boo):
     43        (boo.let.val2):
     44        (boo.let.val3):
     45        * stress/eval-func-decl-in-frozen-global.js: Added.
     46        (assert):
     47        (assertThrow):
     48        (throw.new.Error):
     49        (Object.freeze):
     50        * stress/eval-func-decl-in-global-of-eval.js: Added.
     51        (assert):
     52        (assertThrow):
     53        (bar):
     54        (baz):
     55        (foobar):
     56        * stress/eval-func-decl-in-global.js: Added.
     57        (assert):
     58        (assertThrow):
     59        * stress/eval-func-decl-in-if.js: Added.
     60        (assert):
     61        * stress/eval-func-decl-within-eval-with-reassign-to-var.js: Added.
     62        (assert):
     63        (assertThrow):
     64        (foo):
     65        (boo):
     66        (foobar):
     67        (hoo):
     68        (joo):
     69        (koo):
     70        (loo):
     71        * stress/eval-func-decl-within-eval-without-reassign-to-let.js: Added.
     72        (assert):
     73        (assertThrow):
     74        (foo):
     75        (boo):
     76        (goo):
     77        * stress/variable-under-tdz-eval-tricky.js:
     78        (assert):
     79        * test262.yaml:
     80
    1812017-04-27  Mark Lam  <mark.lam@apple.com>
    282
  • trunk/JSTests/stress/variable-under-tdz-eval-tricky.js

    r215779 r215984  
    4444        let b = {a: eval("function b(){ return b; }"), b: (1, eval)("(b())")};
    4545    } catch(e) {
    46         threw = e instanceof ReferenceError;
     46        threw = e instanceof SyntaxError;
    4747    }
    4848    assert(threw);
     
    5454        let {b} = {a: eval("function b(){ return b; }"), b: (1, eval)("print(b())")};
    5555    } catch(e) {
    56         threw = e instanceof ReferenceError;
     56        threw = e instanceof SyntaxError;
    5757    }
    5858    assert(threw);
  • trunk/JSTests/test262.yaml

    r215779 r215984  
    911911  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    912912- path: test262/test/annexB/language/eval-code/direct/func-block-decl-eval-func-exsting-block-fn-no-init.js
    913   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     913  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    914914- path: test262/test/annexB/language/eval-code/direct/func-block-decl-eval-func-exsting-block-fn-update.js
    915915  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    917917  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    918918- path: test262/test/annexB/language/eval-code/direct/func-block-decl-eval-func-exsting-fn-update.js
    919   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     919  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    920920- path: test262/test/annexB/language/eval-code/direct/func-block-decl-eval-func-exsting-var-no-init.js
    921921  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    923923  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    924924- path: test262/test/annexB/language/eval-code/direct/func-block-decl-eval-func-init.js
    925   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     925  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    926926- path: test262/test/annexB/language/eval-code/direct/func-block-decl-eval-func-no-skip-param.js
    927   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     927  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    928928- path: test262/test/annexB/language/eval-code/direct/func-block-decl-eval-func-no-skip-try.js
    929   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     929  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    930930- path: test262/test/annexB/language/eval-code/direct/func-block-decl-eval-func-skip-early-err-block.js
    931931  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    941941  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    942942- path: test262/test/annexB/language/eval-code/direct/func-block-decl-eval-func-skip-early-err.js
    943   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     943  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    944944- path: test262/test/annexB/language/eval-code/direct/func-block-decl-eval-func-update.js
    945945  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    947947  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    948948- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-a-eval-func-exsting-block-fn-no-init.js
    949   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     949  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    950950- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-a-eval-func-exsting-block-fn-update.js
    951951  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    953953  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    954954- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-a-eval-func-exsting-fn-update.js
    955   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     955  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    956956- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-a-eval-func-exsting-var-no-init.js
    957957  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    959959  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    960960- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-a-eval-func-init.js
    961   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     961  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    962962- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-a-eval-func-no-skip-param.js
    963   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     963  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    964964- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-a-eval-func-no-skip-try.js
    965   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     965  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    966966- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-a-eval-func-skip-early-err-block.js
    967967  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    977977  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    978978- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-a-eval-func-skip-early-err.js
    979   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     979  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    980980- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-a-eval-func-update.js
    981981  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    983983  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    984984- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-b-eval-func-exsting-block-fn-no-init.js
    985   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     985  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    986986- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-b-eval-func-exsting-block-fn-update.js
    987987  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    989989  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    990990- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-b-eval-func-exsting-fn-update.js
    991   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     991  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    992992- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-b-eval-func-exsting-var-no-init.js
    993993  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    995995  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    996996- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-b-eval-func-init.js
    997   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     997  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    998998- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-b-eval-func-no-skip-param.js
    999   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     999  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10001000- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-b-eval-func-no-skip-try.js
    1001   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1001  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10021002- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-b-eval-func-skip-early-err-block.js
    10031003  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    10131013  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10141014- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-b-eval-func-skip-early-err.js
    1015   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1015  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10161016- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-decl-b-eval-func-update.js
    10171017  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    10191019  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10201020- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-stmt-eval-func-exsting-block-fn-no-init.js
    1021   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1021  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10221022- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-stmt-eval-func-exsting-block-fn-update.js
    10231023  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    10251025  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10261026- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-stmt-eval-func-exsting-fn-update.js
    1027   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1027  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10281028- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-stmt-eval-func-exsting-var-no-init.js
    10291029  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    10311031  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10321032- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-stmt-eval-func-init.js
    1033   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1033  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10341034- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-stmt-eval-func-no-skip-param.js
    1035   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1035  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10361036- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-stmt-eval-func-no-skip-try.js
    1037   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1037  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10381038- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-stmt-eval-func-skip-early-err-block.js
    10391039  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    10491049  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10501050- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-stmt-eval-func-skip-early-err.js
    1051   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1051  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10521052- path: test262/test/annexB/language/eval-code/direct/func-if-decl-else-stmt-eval-func-update.js
    10531053  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    10551055  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10561056- path: test262/test/annexB/language/eval-code/direct/func-if-decl-no-else-eval-func-exsting-block-fn-no-init.js
    1057   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1057  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10581058- path: test262/test/annexB/language/eval-code/direct/func-if-decl-no-else-eval-func-exsting-block-fn-update.js
    10591059  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    10611061  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10621062- path: test262/test/annexB/language/eval-code/direct/func-if-decl-no-else-eval-func-exsting-fn-update.js
    1063   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1063  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10641064- path: test262/test/annexB/language/eval-code/direct/func-if-decl-no-else-eval-func-exsting-var-no-init.js
    10651065  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    10671067  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10681068- path: test262/test/annexB/language/eval-code/direct/func-if-decl-no-else-eval-func-init.js
    1069   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1069  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10701070- path: test262/test/annexB/language/eval-code/direct/func-if-decl-no-else-eval-func-no-skip-param.js
    1071   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1071  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10721072- path: test262/test/annexB/language/eval-code/direct/func-if-decl-no-else-eval-func-no-skip-try.js
    1073   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1073  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10741074- path: test262/test/annexB/language/eval-code/direct/func-if-decl-no-else-eval-func-skip-early-err-block.js
    10751075  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    10851085  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10861086- path: test262/test/annexB/language/eval-code/direct/func-if-decl-no-else-eval-func-skip-early-err.js
    1087   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1087  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10881088- path: test262/test/annexB/language/eval-code/direct/func-if-decl-no-else-eval-func-update.js
    10891089  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    10911091  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10921092- path: test262/test/annexB/language/eval-code/direct/func-if-stmt-else-decl-eval-func-exsting-block-fn-no-init.js
    1093   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1093  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10941094- path: test262/test/annexB/language/eval-code/direct/func-if-stmt-else-decl-eval-func-exsting-block-fn-update.js
    10951095  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    10971097  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    10981098- path: test262/test/annexB/language/eval-code/direct/func-if-stmt-else-decl-eval-func-exsting-fn-update.js
    1099   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1099  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11001100- path: test262/test/annexB/language/eval-code/direct/func-if-stmt-else-decl-eval-func-exsting-var-no-init.js
    11011101  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    11031103  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11041104- path: test262/test/annexB/language/eval-code/direct/func-if-stmt-else-decl-eval-func-init.js
    1105   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1105  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11061106- path: test262/test/annexB/language/eval-code/direct/func-if-stmt-else-decl-eval-func-no-skip-param.js
    1107   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1107  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11081108- path: test262/test/annexB/language/eval-code/direct/func-if-stmt-else-decl-eval-func-no-skip-try.js
    1109   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1109  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11101110- path: test262/test/annexB/language/eval-code/direct/func-if-stmt-else-decl-eval-func-skip-early-err-block.js
    11111111  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    11211121  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11221122- path: test262/test/annexB/language/eval-code/direct/func-if-stmt-else-decl-eval-func-skip-early-err.js
    1123   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1123  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11241124- path: test262/test/annexB/language/eval-code/direct/func-if-stmt-else-decl-eval-func-update.js
    11251125  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    11271127  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11281128- path: test262/test/annexB/language/eval-code/direct/func-switch-case-eval-func-exsting-block-fn-no-init.js
    1129   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1129  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11301130- path: test262/test/annexB/language/eval-code/direct/func-switch-case-eval-func-exsting-block-fn-update.js
    11311131  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    11331133  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11341134- path: test262/test/annexB/language/eval-code/direct/func-switch-case-eval-func-exsting-fn-update.js
    1135   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1135  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11361136- path: test262/test/annexB/language/eval-code/direct/func-switch-case-eval-func-exsting-var-no-init.js
    11371137  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    11391139  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11401140- path: test262/test/annexB/language/eval-code/direct/func-switch-case-eval-func-init.js
    1141   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1141  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11421142- path: test262/test/annexB/language/eval-code/direct/func-switch-case-eval-func-no-skip-param.js
    1143   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1143  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11441144- path: test262/test/annexB/language/eval-code/direct/func-switch-case-eval-func-no-skip-try.js
    1145   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1145  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11461146- path: test262/test/annexB/language/eval-code/direct/func-switch-case-eval-func-skip-early-err-block.js
    11471147  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    11571157  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11581158- path: test262/test/annexB/language/eval-code/direct/func-switch-case-eval-func-skip-early-err.js
    1159   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1159  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11601160- path: test262/test/annexB/language/eval-code/direct/func-switch-case-eval-func-update.js
    11611161  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    11631163  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11641164- path: test262/test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-exsting-block-fn-no-init.js
    1165   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1165  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11661166- path: test262/test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-exsting-block-fn-update.js
    11671167  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    11691169  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11701170- path: test262/test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-exsting-fn-update.js
    1171   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1171  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11721172- path: test262/test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-exsting-var-no-init.js
    11731173  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    11751175  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11761176- path: test262/test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-init.js
    1177   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1177  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11781178- path: test262/test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-no-skip-param.js
    1179   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1179  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11801180- path: test262/test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-no-skip-try.js
    1181   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1181  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11821182- path: test262/test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-skip-early-err-block.js
    11831183  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    11931193  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11941194- path: test262/test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-skip-early-err.js
    1195   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1195  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11961196- path: test262/test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-update.js
    11971197  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    11981198- path: test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-block-scoping.js
    1199   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1199  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12001200- path: test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-exsting-block-fn-no-init.js
    1201   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1201  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12021202- path: test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-exsting-block-fn-update.js
    12031203  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    12051205  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12061206- path: test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-exsting-fn-update.js
    1207   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1207  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12081208- path: test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-exsting-global-init.js
    12091209  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    12151215  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12161216- path: test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-init.js
    1217   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1217  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    12181218- path: test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-no-skip-try.js
    1219   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1219  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12201220- path: test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-skip-early-err-block.js
    12211221  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    12311231  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12321232- path: test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-skip-early-err.js
    1233   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1233  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12341234- path: test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-update.js
    12351235  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12361236- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-block-scoping.js
    1237   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1237  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12381238- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-exsting-block-fn-no-init.js
    1239   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1239  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12401240- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-exsting-block-fn-update.js
    12411241  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    12431243  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12441244- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-exsting-fn-update.js
    1245   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1245  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12461246- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-exsting-global-init.js
    12471247  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    12531253  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12541254- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-init.js
    1255   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1255  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    12561256- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-no-skip-try.js
    1257   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1257  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12581258- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-skip-early-err-block.js
    12591259  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    12691269  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12701270- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-skip-early-err.js
    1271   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1271  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12721272- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-update.js
    12731273  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12741274- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-block-scoping.js
    1275   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1275  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12761276- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-exsting-block-fn-no-init.js
    1277   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1277  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12781278- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-exsting-block-fn-update.js
    12791279  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    12811281  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12821282- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-exsting-fn-update.js
    1283   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1283  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12841284- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-exsting-global-init.js
    12851285  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    12911291  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12921292- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-init.js
    1293   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1293  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    12941294- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-no-skip-try.js
    1295   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1295  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    12961296- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-skip-early-err-block.js
    12971297  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    13071307  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13081308- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-skip-early-err.js
    1309   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1309  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13101310- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-update.js
    13111311  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13121312- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-block-scoping.js
    1313   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1313  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13141314- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-exsting-block-fn-no-init.js
    1315   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1315  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13161316- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-exsting-block-fn-update.js
    13171317  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    13191319  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13201320- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-exsting-fn-update.js
    1321   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1321  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13221322- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-exsting-global-init.js
    13231323  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    13291329  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13301330- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-init.js
    1331   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1331  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    13321332- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-no-skip-try.js
    1333   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1333  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13341334- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-skip-early-err-block.js
    13351335  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    13451345  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13461346- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-skip-early-err.js
    1347   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1347  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13481348- path: test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-update.js
    13491349  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13501350- path: test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-block-scoping.js
    1351   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1351  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13521352- path: test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-exsting-block-fn-no-init.js
    1353   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1353  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13541354- path: test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-exsting-block-fn-update.js
    13551355  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    13571357  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13581358- path: test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-exsting-fn-update.js
    1359   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1359  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13601360- path: test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-exsting-global-init.js
    13611361  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    13671367  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13681368- path: test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-init.js
    1369   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1369  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    13701370- path: test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-no-skip-try.js
    1371   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1371  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13721372- path: test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-skip-early-err-block.js
    13731373  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    13831383  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13841384- path: test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-skip-early-err.js
    1385   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1385  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13861386- path: test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-update.js
    13871387  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13881388- path: test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-block-scoping.js
    1389   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1389  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13901390- path: test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-exsting-block-fn-no-init.js
    1391   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1391  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13921392- path: test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-exsting-block-fn-update.js
    13931393  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    13951395  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13961396- path: test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-exsting-fn-update.js
    1397   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1397  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    13981398- path: test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-exsting-global-init.js
    13991399  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    14051405  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14061406- path: test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-init.js
    1407   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1407  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    14081408- path: test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-no-skip-try.js
    1409   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1409  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14101410- path: test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-skip-early-err-block.js
    14111411  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    14211421  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14221422- path: test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-skip-early-err.js
    1423   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1423  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14241424- path: test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-update.js
    14251425  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14261426- path: test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-block-scoping.js
    1427   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1427  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14281428- path: test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-exsting-block-fn-no-init.js
    1429   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1429  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14301430- path: test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-exsting-block-fn-update.js
    14311431  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    14331433  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14341434- path: test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-exsting-fn-update.js
    1435   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1435  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14361436- path: test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-exsting-global-init.js
    14371437  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    14431443  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14441444- path: test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-init.js
    1445   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1445  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    14461446- path: test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-no-skip-try.js
    1447   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1447  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14481448- path: test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-skip-early-err-block.js
    14491449  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    14591459  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14601460- path: test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-skip-early-err.js
    1461   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1461  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14621462- path: test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-update.js
    14631463  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14641464- path: test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-block-scoping.js
    1465   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1465  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14661466- path: test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-exsting-block-fn-no-init.js
    1467   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1467  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14681468- path: test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-exsting-block-fn-update.js
    14691469  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    14711471  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14721472- path: test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-exsting-fn-update.js
    1473   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1473  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14741474- path: test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-exsting-global-init.js
    14751475  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    14811481  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14821482- path: test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-init.js
    1483   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1483  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    14841484- path: test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-no-skip-try.js
    1485   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1485  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14861486- path: test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-skip-early-err-block.js
    14871487  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    14971497  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    14981498- path: test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-skip-early-err.js
     1499  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1500- path: test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-update.js
     1501  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1502- path: test262/test/annexB/language/eval-code/direct/var-env-lower-lex-catch-non-strict.js
    14991503  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    1500 - path: test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-update.js
    1501   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    1502 - path: test262/test/annexB/language/eval-code/direct/var-env-lower-lex-catch-non-strict.js
    1503   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15041504- path: test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-block-scoping.js
    1505   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1505  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15061506- path: test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-exsting-block-fn-no-init.js
    1507   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1507  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15081508- path: test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-exsting-block-fn-update.js
    15091509  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    15111511  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15121512- path: test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-exsting-fn-update.js
    1513   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1513  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15141514- path: test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-exsting-global-init.js
    15151515  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    15211521  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15221522- path: test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-init.js
    1523   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1523  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    15241524- path: test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-no-skip-try.js
    1525   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1525  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15261526- path: test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-skip-early-err-block.js
    15271527  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    15371537  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15381538- path: test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-skip-early-err.js
    1539   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1539  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15401540- path: test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-update.js
    15411541  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15421542- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-block-scoping.js
    1543   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1543  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15441544- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-exsting-block-fn-no-init.js
    1545   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1545  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15461546- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-exsting-block-fn-update.js
    15471547  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    15491549  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15501550- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-exsting-fn-update.js
    1551   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1551  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15521552- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-exsting-global-init.js
    15531553  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    15591559  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15601560- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-init.js
    1561   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1561  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    15621562- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-no-skip-try.js
    1563   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1563  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15641564- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-skip-early-err-block.js
    15651565  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    15751575  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15761576- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-skip-early-err.js
    1577   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1577  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15781578- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-update.js
    15791579  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15801580- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-block-scoping.js
    1581   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1581  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15821582- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-exsting-block-fn-no-init.js
    1583   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1583  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15841584- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-exsting-block-fn-update.js
    15851585  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    15871587  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15881588- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-exsting-fn-update.js
    1589   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1589  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15901590- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-exsting-global-init.js
    15911591  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    15971597  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    15981598- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-init.js
    1599   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1599  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    16001600- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-no-skip-try.js
    1601   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1601  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16021602- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-skip-early-err-block.js
    16031603  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    16131613  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16141614- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-skip-early-err.js
    1615   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1615  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16161616- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-update.js
    16171617  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16181618- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-block-scoping.js
    1619   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1619  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16201620- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-exsting-block-fn-no-init.js
    1621   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1621  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16221622- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-exsting-block-fn-update.js
    16231623  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    16251625  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16261626- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-exsting-fn-update.js
    1627   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1627  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16281628- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-exsting-global-init.js
    16291629  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    16351635  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16361636- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-init.js
    1637   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1637  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    16381638- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-no-skip-try.js
    1639   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1639  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16401640- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-skip-early-err-block.js
    16411641  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    16511651  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16521652- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-skip-early-err.js
    1653   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1653  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16541654- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-update.js
    16551655  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16561656- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-block-scoping.js
    1657   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1657  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16581658- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-exsting-block-fn-no-init.js
    1659   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1659  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16601660- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-exsting-block-fn-update.js
    16611661  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    16631663  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16641664- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-exsting-fn-update.js
    1665   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1665  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16661666- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-exsting-global-init.js
    16671667  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    16731673  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16741674- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-init.js
    1675   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1675  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    16761676- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-no-skip-try.js
    1677   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1677  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16781678- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-skip-early-err-block.js
    16791679  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    16891689  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16901690- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-skip-early-err.js
    1691   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1691  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16921692- path: test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-update.js
    16931693  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16941694- path: test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-block-scoping.js
    1695   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1695  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16961696- path: test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-exsting-block-fn-no-init.js
    1697   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1697  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    16981698- path: test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-exsting-block-fn-update.js
    16991699  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    17011701  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17021702- path: test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-exsting-fn-update.js
    1703   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1703  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17041704- path: test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-exsting-global-init.js
    17051705  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    17111711  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17121712- path: test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-init.js
    1713   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1713  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    17141714- path: test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-no-skip-try.js
    1715   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1715  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17161716- path: test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-skip-early-err-block.js
    17171717  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    17271727  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17281728- path: test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-skip-early-err.js
    1729   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1729  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17301730- path: test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-update.js
    17311731  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17321732- path: test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-block-scoping.js
    1733   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1733  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17341734- path: test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-exsting-block-fn-no-init.js
    1735   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1735  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17361736- path: test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-exsting-block-fn-update.js
    17371737  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    17391739  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17401740- path: test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-exsting-fn-update.js
    1741   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1741  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17421742- path: test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-exsting-global-init.js
    17431743  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    17491749  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17501750- path: test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-init.js
    1751   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1751  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    17521752- path: test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-no-skip-try.js
    1753   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1753  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17541754- path: test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-skip-early-err-block.js
    17551755  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    17651765  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17661766- path: test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-skip-early-err.js
    1767   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1767  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17681768- path: test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-update.js
    17691769  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17701770- path: test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-block-scoping.js
    1771   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1771  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17721772- path: test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-exsting-block-fn-no-init.js
    1773   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1773  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17741774- path: test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-exsting-block-fn-update.js
    17751775  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    17771777  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17781778- path: test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-exsting-fn-update.js
    1779   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1779  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17801780- path: test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-exsting-global-init.js
    17811781  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     
    17871787  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17881788- path: test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-init.js
    1789   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
     1789  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/fnGlobalObject.js", "../../../../../harness/propertyHelper.js"], []
    17901790- path: test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-no-skip-try.js
    1791   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1791  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    17921792- path: test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-skip-early-err-block.js
    17931793  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     
    18031803  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    18041804- path: test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-skip-early-err.js
    1805   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
     1805  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
    18061806- path: test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-update.js
    18071807  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
  • trunk/LayoutTests/ChangeLog

    r215977 r215984  
     12017-04-30  Oleksandr Skachkov  <gskachkov@gmail.com>
     2
     3        [ES6]. Implement Annex B.3.3 function hoisting rules for eval
     4        https://bugs.webkit.org/show_bug.cgi?id=163208
     5
     6        Reviewed by Saam Barati.
     7
     8        * inspector/runtime/evaluate-CommandLineAPI-expected.txt:
     9        * inspector/runtime/evaluate-CommandLineAPI.html:
     10        * js/parser-syntax-check-expected.txt:
     11        * js/script-tests/parser-syntax-check.js:
     12
    1132017-04-29  Oleksandr Skachkov  <gskachkov@gmail.com>
    214
  • trunk/LayoutTests/inspector/runtime/evaluate-CommandLineAPI-expected.txt

    r215779 r215984  
    3535PASS: `values` should be `window.values` and not shadowed by CommandLineAPI `values` function.
    3636
     37-- Running test case: NonStrictEvalHoistEvaluations
     38PASS: Should be able to access var in global scope.
     39PASS: Should be able to hoist function to var in global scope.
     40PASS: Should be able to hoist function to var in global scope and keep it.
     41
  • trunk/LayoutTests/inspector/runtime/evaluate-CommandLineAPI.html

    r215779 r215984  
    77let letGlobalVariable = 2;
    88const constGlobalVariable = 3;
     9var varGlobalFunctionVariable = 4;
    910
    1011function test()
     
    166167                resolve();
    167168            });
     169        }
     170    });
     171
     172    suite.addTestCase({
     173        name: "NonStrictEvalHoistEvaluations",
     174        description: "Test CommandLineAPI does not shadow global object variable that hoisted from eval.",
     175        test(resolve, reject) {
     176            testEvaluate("varGlobalFunctionVariable", (resultValue) => {
     177                InspectorTest.expectThat(resultValue === 4, "Should be able to access var in global scope.");
     178            });           
     179            testEvaluate(`
     180                let noError = varGlobalFunctionVariable === 4;
     181                eval('eval(" { function varGlobalFunctionVariable() { }; } ")');
     182                typeof varGlobalFunctionVariable === 'function' && noError;
     183            `, (resultValue) => {
     184                InspectorTest.expectThat(resultValue, "Should be able to hoist function to var in global scope.");
     185            });
     186            testEvaluate("varGlobalFunctionVariable", (resultValue) => {
     187                InspectorTest.expectThat(typeof resultValue, "Should be able to hoist function to var in global scope and keep it.");
     188                resolve();
     189            });   
    168190        }
    169191    });
  • trunk/LayoutTests/js/parser-syntax-check-expected.txt

    r215779 r215984  
    689689PASS Invalid: "let f1; function f1(a) {};". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
    690690PASS Invalid: "function f() { let f1; function f1(a) {}; }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'f1' in strict mode."
    691 PASS Valid:   "{ function f1(a) {}; let f1; }"
     691PASS Invalid: "{ function f1(a) {}; let f1; }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'f1'."
    692692PASS Invalid: "function f() { { function f1(a) {}; let f1; } }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'f1'."
    693 PASS Valid:   "{ function f1(a) {}; const f1 = 25; }"
     693PASS Invalid: "{ function f1(a) {}; const f1 = 25; }". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'f1'."
    694694PASS Invalid: "function f() { { function f1(a) {}; const f1 = 25; } }". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'f1'."
    695 PASS Valid:   "{ function f1(a) {}; class f1{}; }"
     695PASS Invalid: "{ function f1(a) {}; class f1{}; }". Produced the following syntax error: "SyntaxError: Cannot declare a class twice: 'f1'."
    696696PASS Invalid: "function f() { { function f1(a) {}; class f1{}; } }". Produced the following syntax error: "SyntaxError: Cannot declare a class twice: 'f1'."
    697697PASS Invalid: "function foo() { { let bar; function bar() { } } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'bar' in strict mode."
     
    709709PASS Valid:   "switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; }"
    710710PASS Valid:   "function f() { switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; } }"
    711 PASS Valid:   "switch('foo') { case 1: let foo; function foo() {}; break; case 2: function foo() {}; break; }"
     711PASS Invalid: "switch('foo') { case 1: let foo; function foo() {}; break; case 2: function foo() {}; break; }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'foo' in strict mode."
    712712PASS Invalid: "function f() { switch('foo') { case 1: let foo; function foo() {}; break; case 2: function foo() {}; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'foo' in strict mode."
    713 PASS Valid:   "switch('foo') { case 1: function foo() {}; let foo; break; case 2: function foo() {}; break; }"
     713PASS Invalid: "switch('foo') { case 1: function foo() {}; let foo; break; case 2: function foo() {}; break; }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
    714714PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; let foo; break; case 2: function foo() {}; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
    715 PASS Valid:   "switch('foo') { case 1: function foo() {}; const foo = 25; break; case 2: function foo() {}; break; }"
     715PASS Invalid: "switch('foo') { case 1: function foo() {}; const foo = 25; break; case 2: function foo() {}; break; }". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'foo'."
    716716PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; const foo = 25; break; case 2: function foo() {}; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a const variable twice: 'foo'."
    717 PASS Valid:   "switch('foo') { case 1: function foo() {}; class foo {} ; break; case 2: function foo() {}; break; }"
     717PASS Invalid: "switch('foo') { case 1: function foo() {}; class foo {} ; break; case 2: function foo() {}; break; }". Produced the following syntax error: "SyntaxError: Cannot declare a class twice: 'foo'."
    718718PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; class foo {} ; break; case 2: function foo() {}; break; } }". Produced the following syntax error: "SyntaxError: Cannot declare a class twice: 'foo'."
    719 PASS Valid:   "switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: let foo; }"
     719PASS Invalid: "switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: let foo; }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
    720720PASS Invalid: "function f() { switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: let foo; } }". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
    721721PASS Valid:   "function foo() { switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: { let foo; } } }"
     
    735735PASS Valid:   "if (true) function foo() { }; "
    736736PASS Valid:   "function f() { if (true) function foo() { };  }"
    737 PASS Invalid: " let foo; if (true) function foo() { };". Produced the following syntax error: "SyntaxError: Cannot declare a function that shadows a let/const/class/function variable 'foo' in strict mode."
     737PASS Valid:   " let foo; if (true) function foo() { };"
    738738PASS Valid:   "function f() {  let foo; if (true) function foo() { }; }"
    739739PASS Valid:   "function baz() { let foo; if (true) function foo() { }; }"
    740740PASS Valid:   "function f() { function baz() { let foo; if (true) function foo() { }; } }"
    741 PASS Invalid: "if (true) function foo() { }; let foo;". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
     741PASS Valid:   "if (true) function foo() { }; let foo;"
    742742PASS Valid:   "function f() { if (true) function foo() { }; let foo; }"
    743 PASS Invalid: "{ if (true) function foo() { }; } let foo;". Produced the following syntax error: "SyntaxError: Cannot declare a let variable twice: 'foo'."
     743PASS Valid:   "{ if (true) function foo() { }; } let foo;"
    744744PASS Valid:   "function f() { { if (true) function foo() { }; } let foo; }"
    745745PASS Invalid: "let foo; while (false) function foo() { }; ". Produced the following syntax error: "SyntaxError: Unexpected keyword 'function'. Function declarations are only allowed inside block statements or at the top level of a program."
  • trunk/LayoutTests/js/script-tests/parser-syntax-check.js

    r215779 r215984  
    447447invalid("function foo() { let f1; function f1(a) {}; }")
    448448invalid("let f1; function f1(a) {};")
    449 onlyValidGlobally("{ function f1(a) {}; let f1; }")
    450 onlyValidGlobally("{ function f1(a) {}; const f1 = 25; }")
    451 onlyValidGlobally("{ function f1(a) {}; class f1{}; }")
     449invalid("{ function f1(a) {}; let f1; }")
     450invalid("{ function f1(a) {}; const f1 = 25; }")
     451invalid("{ function f1(a) {}; class f1{}; }")
    452452invalid("function foo() { { let bar; function bar() { } } }")
    453453invalid("function foo() { { function bar() { }; let bar; } }")
     
    457457invalid("function foo() { { function bar() { }; class bar{}; } }")
    458458valid("switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; }")
    459 onlyValidGlobally("switch('foo') { case 1: let foo; function foo() {}; break; case 2: function foo() {}; break; }")
    460 onlyValidGlobally("switch('foo') { case 1: function foo() {}; let foo; break; case 2: function foo() {}; break; }")
    461 onlyValidGlobally("switch('foo') { case 1: function foo() {}; const foo = 25; break; case 2: function foo() {}; break; }")
    462 onlyValidGlobally("switch('foo') { case 1: function foo() {}; class foo {} ; break; case 2: function foo() {}; break; }")
    463 onlyValidGlobally("switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: let foo; }")
     459invalid("switch('foo') { case 1: let foo; function foo() {}; break; case 2: function foo() {}; break; }")
     460invalid("switch('foo') { case 1: function foo() {}; let foo; break; case 2: function foo() {}; break; }")
     461invalid("switch('foo') { case 1: function foo() {}; const foo = 25; break; case 2: function foo() {}; break; }")
     462invalid("switch('foo') { case 1: function foo() {}; class foo {} ; break; case 2: function foo() {}; break; }")
     463invalid("switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: let foo; }")
    464464valid("function foo() { switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; case 3: { let foo; } } }")
    465465invalid("'use strict'; switch('foo') { case 1: function foo() {}; break; case 2: function foo() {}; break; }");
     
    470470invalid("'use strict'; if (true) function foo() { }; ");
    471471valid("if (true) function foo() { }; ");
    472 onlyInvalidGlobally(" let foo; if (true) function foo() { };");
     472valid(" let foo; if (true) function foo() { };");
    473473valid("function baz() { let foo; if (true) function foo() { }; }");
    474 onlyInvalidGlobally("if (true) function foo() { }; let foo;");
    475 onlyInvalidGlobally("{ if (true) function foo() { }; } let foo;");
     474valid("if (true) function foo() { }; let foo;");
     475valid("{ if (true) function foo() { }; } let foo;");
    476476invalid("let foo; while (false) function foo() { }; ");
    477477invalid("let foo;  { while (false) function foo() { }; } ");
  • trunk/Source/JavaScriptCore/ChangeLog

    r215977 r215984  
     12017-04-30  Oleksandr Skachkov  <gskachkov@gmail.com>
     2
     3        [ES6]. Implement Annex B.3.3 function hoisting rules for eval
     4        https://bugs.webkit.org/show_bug.cgi?id=163208
     5
     6        Reviewed by Saam Barati.
     7
     8        Current patch implements Annex B.3.3 that is related to
     9        hoisting of function declaration in eval.
     10        https://tc39.github.io/ecma262/#sec-web-compat-evaldeclarationinstantiation
     11        Function declaration in eval should create variable with
     12        function name in function scope where eval is invoked
     13        or bind to variable if it declared outside of the eval.
     14        If variable is created it can be removed by 'delete a;' command.
     15        If eval is invoke in block scope that contains let/const
     16        variable with the same name as function declaration
     17        we do not bind. This patch leads to the following behavior:
     18        '''
     19        function foo() {
     20           {
     21             print(boo); // undefined
     22             eval('{ function boo() {}}');
     23             print(boo); // function boo() {}
     24           }
     25           print(boo); // function boo() {}
     26        }
     27
     28        function foobar() {
     29          {
     30            let boo = 10;
     31            print(boo); // 10;
     32            eval('{ function boo() {}}');
     33            print(boo); // 10;
     34          }
     35          print(boo) // 10
     36        }
     37
     38        function bar() {
     39           {
     40              var boo = 10;
     41              print(boo); // 10
     42              eval('{ function boo() {} }');
     43              print(boo); // function boo() {}
     44           }
     45           print(boo); // function boo() {}
     46        }       
     47       
     48        function bas() {
     49            {
     50                 let boo = 10;
     51                 eval(' { function boo() {} } ');
     52                 print(boo); // 10
     53            }
     54            print(boo); //Reference Error
     55        }
     56        '''
     57
     58        Current implementation relies on already implemented
     59        'hoist function in sloppy mode' feature, with small changes.
     60        In short it works in following way: during hoisting of function
     61        with name S in eval, we are looking for first scope that
     62        contains space for variable with name S and if this scope
     63        has var type we bind function there
     64
     65        To implement this feature was added bytecode ops:
     66        op_resolve_scope_for_hoisting_func_decl_in_eval - get variable scope
     67        or return undefined if variable can't be binded there.
     68
     69        There is a corner case, hoist function in eval within catch block,
     70        that is not covered by this patch, and will be fixed in
     71        https://bugs.webkit.org/show_bug.cgi?id=168184
     72
     73        * bytecode/BytecodeDumper.cpp:
     74        (JSC::BytecodeDumper<Block>::dumpBytecode):
     75        * bytecode/BytecodeList.json:
     76        * bytecode/BytecodeUseDef.h:
     77        (JSC::computeUsesForBytecodeOffset):
     78        (JSC::computeDefsForBytecodeOffset):
     79        * bytecode/CodeBlock.cpp:
     80        (JSC::CodeBlock::finalizeLLIntInlineCaches):
     81        * bytecode/EvalCodeBlock.h:
     82        (JSC::EvalCodeBlock::functionHoistingCandidate):
     83        (JSC::EvalCodeBlock::numFunctionHoistingCandidates):
     84        * bytecode/UnlinkedEvalCodeBlock.h:
     85        * bytecompiler/BytecodeGenerator.cpp:
     86        (JSC::BytecodeGenerator::BytecodeGenerator):
     87        (JSC::BytecodeGenerator::hoistSloppyModeFunctionIfNecessary):
     88        (JSC::BytecodeGenerator::emitResolveScopeForHoistingFuncDeclInEval):
     89        * bytecompiler/BytecodeGenerator.h:
     90        * dfg/DFGAbstractInterpreterInlines.h:
     91        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
     92        * dfg/DFGByteCodeParser.cpp:
     93        (JSC::DFG::ByteCodeParser::parseBlock):
     94        * dfg/DFGCapabilities.cpp:
     95        (JSC::DFG::capabilityLevel):
     96        * dfg/DFGClobberize.h:
     97        (JSC::DFG::clobberize):
     98        * dfg/DFGDoesGC.cpp:
     99        (JSC::DFG::doesGC):
     100        * dfg/DFGFixupPhase.cpp:
     101        (JSC::DFG::FixupPhase::fixupNode):
     102        * dfg/DFGNode.h:
     103        (JSC::DFG::Node::hasIdentifier):
     104        * dfg/DFGNodeType.h:
     105        * dfg/DFGOperations.cpp:
     106        * dfg/DFGOperations.h:
     107        * dfg/DFGPredictionPropagationPhase.cpp:
     108        * dfg/DFGSafeToExecute.h:
     109        (JSC::DFG::safeToExecute):
     110        * dfg/DFGSpeculativeJIT.cpp:
     111        (JSC::DFG::SpeculativeJIT::compileResolveScopeForHoistingFuncDeclInEval):
     112        * dfg/DFGSpeculativeJIT.h:
     113        (JSC::DFG::SpeculativeJIT::callOperation):
     114        * dfg/DFGSpeculativeJIT32_64.cpp:
     115        (JSC::DFG::SpeculativeJIT::compile):
     116        * dfg/DFGSpeculativeJIT64.cpp:
     117        (JSC::DFG::SpeculativeJIT::compile):
     118        * ftl/FTLCapabilities.cpp:
     119        (JSC::FTL::canCompile):
     120        * ftl/FTLLowerDFGToB3.cpp:
     121        (JSC::FTL::DFG::LowerDFGToB3::compileNode):
     122        (JSC::FTL::DFG::LowerDFGToB3::compileResolveScopeForHoistingFuncDeclInEval):
     123        * interpreter/Interpreter.cpp:
     124        (JSC::Interpreter::execute):
     125        * jit/JIT.cpp:
     126        (JSC::JIT::privateCompileMainPass):
     127        * jit/JIT.h:
     128        * jit/JITOperations.h:
     129        * jit/JITPropertyAccess.cpp:
     130        (JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval):
     131        * jit/JITPropertyAccess32_64.cpp:
     132        (JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval):
     133        * llint/LowLevelInterpreter.asm:
     134        * parser/Parser.cpp:
     135        (JSC::Parser<LexerType>::parseFunctionDeclarationStatement):
     136        * parser/Parser.h:
     137        (JSC::Scope::getSloppyModeHoistedFunctions):
     138        (JSC::Parser::declareFunction):
     139        * runtime/CommonSlowPaths.cpp:
     140        (JSC::SLOW_PATH_DECL):
     141        * runtime/CommonSlowPaths.h:
     142        * runtime/EvalExecutable.h:
     143        (JSC::EvalExecutable::numFunctionHoistingCandidates):
     144        (JSC::EvalExecutable::numTopLevelFunctionDecls):
     145        (JSC::EvalExecutable::numberOfFunctionDecls): Deleted.
     146        * runtime/JSScope.cpp:
     147        (JSC::JSScope::resolve):
     148        (JSC::JSScope::resolveScopeForHoistingFuncDeclInEval):
     149        * runtime/JSScope.h:
     150
    11512017-04-29  Oleksandr Skachkov  <gskachkov@gmail.com>
    2152
  • trunk/Source/JavaScriptCore/bytecode/BytecodeDumper.cpp

    r215779 r215984  
    15701570        break;
    15711571    }
     1572    case op_resolve_scope_for_hoisting_func_decl_in_eval: {
     1573        int r0 = (++it)->u.operand;
     1574        int scope = (++it)->u.operand;
     1575        int id0 = (++it)->u.operand;
     1576        printLocationAndOp(out, location, it, "resolve_scope_for_hoisting_func_decl_in_eval");
     1577        out.printf("%s, %s, %s", registerName(r0).data(), registerName(scope).data(), idName(id0, identifier(id0)).data());
     1578        break;
     1579    }
    15721580    case op_resolve_scope: {
    15731581        int r0 = (++it)->u.operand;
  • trunk/Source/JavaScriptCore/bytecode/BytecodeList.json

    r215779 r215984  
    153153            { "name" : "op_check_traps", "length" : 1 },
    154154            { "name" : "op_log_shadow_chicken_prologue", "length" : 2},
    155             { "name" : "op_log_shadow_chicken_tail", "length" : 3}
     155            { "name" : "op_log_shadow_chicken_tail", "length" : 3},
     156            { "name" : "op_resolve_scope_for_hoisting_func_decl_in_eval", "length" : 4 }
    156157        ]
    157158    },
  • trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h

    r215779 r215984  
    171171    case op_create_lexical_environment:
    172172    case op_resolve_scope:
     173    case op_resolve_scope_for_hoisting_func_decl_in_eval:
    173174    case op_get_from_scope:
    174175    case op_to_primitive:
     
    383384    case op_create_lexical_environment:
    384385    case op_resolve_scope:
     386    case op_resolve_scope_for_hoisting_func_decl_in_eval:
    385387    case op_strcat:
    386388    case op_to_primitive:
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r215779 r215984  
    13161316            break;
    13171317        }
     1318        // FIXME: https://bugs.webkit.org/show_bug.cgi?id=166418
     1319        // We need to add optimizations for op_resolve_scope_for_hoisting_func_decl_in_eval to do link time scope resolution.
     1320        case op_resolve_scope_for_hoisting_func_decl_in_eval:
     1321            break;
    13181322        case op_get_array_length:
    13191323            break;
  • trunk/Source/JavaScriptCore/bytecode/EvalCodeBlock.h

    r215779 r215984  
    6464    const Identifier& variable(unsigned index) { return unlinkedEvalCodeBlock()->variable(index); }
    6565    unsigned numVariables() { return unlinkedEvalCodeBlock()->numVariables(); }
     66    const Identifier& functionHoistingCandidate(unsigned index) { return unlinkedEvalCodeBlock()->functionHoistingCandidate(index); }
     67    unsigned numFunctionHoistingCandidates() { return unlinkedEvalCodeBlock()->numFunctionHoistingCandidates(); }
    6668   
    6769private:
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedEvalCodeBlock.h

    r215779 r215984  
    5252    }
    5353
     54    const Identifier& functionHoistingCandidate(unsigned index) { return m_functionHoistingCandidates[index]; }
     55    unsigned numFunctionHoistingCandidates() { return m_functionHoistingCandidates.size(); }
     56    void adoptFunctionHoistingCandidates(Vector<Identifier, 0, UnsafeVectorOverflow>&& functionHoistingCandidates)
     57    {
     58        ASSERT(m_functionHoistingCandidates.isEmpty());
     59        m_functionHoistingCandidates = WTFMove(functionHoistingCandidates);
     60    }
    5461private:
    5562    UnlinkedEvalCodeBlock(VM* vm, Structure* structure, const ExecutableInfo& info, DebuggerMode debuggerMode)
     
    5966
    6067    Vector<Identifier, 0, UnsafeVectorOverflow> m_variables;
     68    Vector<Identifier, 0, UnsafeVectorOverflow> m_functionHoistingCandidates;
    6169
    6270public:
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r215972 r215984  
    765765    emitCheckTraps();
    766766   
    767     const DeclarationStacks::FunctionStack& functionStack = evalNode->functionStack();
    768     for (size_t i = 0; i < functionStack.size(); ++i)
    769         m_codeBlock->addFunctionDecl(makeFunction(functionStack[i]));
     767    for (FunctionMetadataNode* function : evalNode->functionStack())
     768        m_codeBlock->addFunctionDecl(makeFunction(function));
    770769
    771770    const VariableEnvironment& varDeclarations = evalNode->varDeclarations();
    772     unsigned numVariables = varDeclarations.size();
    773771    Vector<Identifier, 0, UnsafeVectorOverflow> variables;
    774     variables.reserveCapacity(numVariables);
     772    Vector<Identifier, 0, UnsafeVectorOverflow> hoistedFunctions;
    775773    for (auto& entry : varDeclarations) {
    776774        ASSERT(entry.value.isVar());
    777775        ASSERT(entry.key->isAtomic() || entry.key->isSymbol());
    778         variables.append(Identifier::fromUid(m_vm, entry.key.get()));
     776        if (entry.value.isSloppyModeHoistingCandidate())
     777            hoistedFunctions.append(Identifier::fromUid(m_vm, entry.key.get()));
     778        else
     779            variables.append(Identifier::fromUid(m_vm, entry.key.get()));
    779780    }
    780781    codeBlock->adoptVariables(variables);
     782    codeBlock->adoptFunctionHoistingCandidates(WTFMove(hoistedFunctions));
    781783   
    782784    if (evalNode->usesSuperCall() || evalNode->usesNewTarget())
     
    21782180{
    21792181    if (m_scopeNode->hasSloppyModeHoistedFunction(functionName.impl())) {
    2180         Variable currentFunctionVariable = variable(functionName);
    2181         RefPtr<RegisterID> currentValue;
    2182         if (RegisterID* local = currentFunctionVariable.local())
    2183             currentValue = local;
    2184         else {
    2185             RefPtr<RegisterID> scope = emitResolveScope(nullptr, currentFunctionVariable);
    2186             currentValue = emitGetFromScope(newTemporary(), scope.get(), currentFunctionVariable, DoNotThrowIfNotFound);
    2187         }
    2188        
    2189         ASSERT(m_varScopeLexicalScopeStackIndex);
    2190         ASSERT(*m_varScopeLexicalScopeStackIndex < m_lexicalScopeStack.size());
    2191         LexicalScopeStackEntry varScope = m_lexicalScopeStack[*m_varScopeLexicalScopeStackIndex];
    2192         SymbolTable* varSymbolTable = varScope.m_symbolTable;
    2193         ASSERT(varSymbolTable->scopeType() == SymbolTable::ScopeType::VarScope);
    2194         SymbolTableEntry entry = varSymbolTable->get(NoLockingNecessary, functionName.impl());
    2195         if (functionName == propertyNames().arguments && entry.isNull()) {
    2196             // "arguments" might be put in the parameter scope when we have a non-simple
    2197             // parameter list since "arguments" is visible to expressions inside the
    2198             // parameter evaluation list.
    2199             // e.g:
    2200             // function foo(x = arguments) { { function arguments() { } } }
    2201             RELEASE_ASSERT(*m_varScopeLexicalScopeStackIndex > 0);
    2202             varScope = m_lexicalScopeStack[*m_varScopeLexicalScopeStackIndex - 1];
    2203             SymbolTable* parameterSymbolTable = varScope.m_symbolTable;
    2204             entry = parameterSymbolTable->get(NoLockingNecessary, functionName.impl());
    2205         }
    2206         RELEASE_ASSERT(!entry.isNull());
    2207         bool isLexicallyScoped = false;
    2208         emitPutToScope(varScope.m_scope, variableForLocalEntry(functionName, entry, varScope.m_symbolTableConstantIndex, isLexicallyScoped), currentValue.get(), DoNotThrowIfNotFound, InitializationMode::NotInitialization);
    2209     }
     2182        if (codeType() != EvalCode) {
     2183            Variable currentFunctionVariable = variable(functionName);
     2184            RefPtr<RegisterID> currentValue;
     2185            if (RegisterID* local = currentFunctionVariable.local())
     2186                currentValue = local;
     2187            else {
     2188                RefPtr<RegisterID> scope = emitResolveScope(nullptr, currentFunctionVariable);
     2189                currentValue = emitGetFromScope(newTemporary(), scope.get(), currentFunctionVariable, DoNotThrowIfNotFound);
     2190            }
     2191
     2192            ASSERT(m_varScopeLexicalScopeStackIndex);
     2193            ASSERT(*m_varScopeLexicalScopeStackIndex < m_lexicalScopeStack.size());
     2194            LexicalScopeStackEntry varScope = m_lexicalScopeStack[*m_varScopeLexicalScopeStackIndex];
     2195            SymbolTable* varSymbolTable = varScope.m_symbolTable;
     2196            ASSERT(varSymbolTable->scopeType() == SymbolTable::ScopeType::VarScope);
     2197            SymbolTableEntry entry = varSymbolTable->get(NoLockingNecessary, functionName.impl());
     2198            if (functionName == propertyNames().arguments && entry.isNull()) {
     2199                // "arguments" might be put in the parameter scope when we have a non-simple
     2200                // parameter list since "arguments" is visible to expressions inside the
     2201                // parameter evaluation list.
     2202                // e.g:
     2203                // function foo(x = arguments) { { function arguments() { } } }
     2204                RELEASE_ASSERT(*m_varScopeLexicalScopeStackIndex > 0);
     2205                varScope = m_lexicalScopeStack[*m_varScopeLexicalScopeStackIndex - 1];
     2206                SymbolTable* parameterSymbolTable = varScope.m_symbolTable;
     2207                entry = parameterSymbolTable->get(NoLockingNecessary, functionName.impl());
     2208            }
     2209            RELEASE_ASSERT(!entry.isNull());
     2210            bool isLexicallyScoped = false;
     2211            emitPutToScope(varScope.m_scope, variableForLocalEntry(functionName, entry, varScope.m_symbolTableConstantIndex, isLexicallyScoped), currentValue.get(), DoNotThrowIfNotFound, InitializationMode::NotInitialization);
     2212        } else {
     2213            Variable currentFunctionVariable = variable(functionName);
     2214            RefPtr<RegisterID> currentValue;
     2215            if (RegisterID* local = currentFunctionVariable.local())
     2216                currentValue = local;
     2217            else {
     2218                RefPtr<RegisterID> scope = emitResolveScope(nullptr, currentFunctionVariable);
     2219                currentValue = emitGetFromScope(newTemporary(), scope.get(), currentFunctionVariable, DoNotThrowIfNotFound);
     2220            }
     2221
     2222            RefPtr<RegisterID> scopeId = emitResolveScopeForHoistingFuncDeclInEval(nullptr, functionName);
     2223            RefPtr<RegisterID> checkResult = emitIsUndefined(newTemporary(), scopeId.get());
     2224           
     2225            Ref<Label> isNotVarScopeLabel = newLabel();
     2226            emitJumpIfTrue(checkResult.get(), isNotVarScopeLabel.get());
     2227
     2228            // Put to outer scope
     2229            emitPutToScope(scopeId.get(), functionName, currentValue.get(), DoNotThrowIfNotFound, InitializationMode::NotInitialization);
     2230            emitLabel(isNotVarScopeLabel.get());
     2231
     2232        }
     2233    }
     2234}
     2235
     2236RegisterID* BytecodeGenerator::emitResolveScopeForHoistingFuncDeclInEval(RegisterID* dst, const Identifier& property)
     2237{
     2238    ASSERT(m_codeType == EvalCode);
     2239
     2240    dst = finalDestination(dst);
     2241    emitOpcode(op_resolve_scope_for_hoisting_func_decl_in_eval);
     2242    instructions().append(kill(dst));
     2243    instructions().append(m_topMostScope->index());
     2244    instructions().append(addConstant(property));
     2245    return dst;
    22102246}
    22112247
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h

    r215972 r215984  
    694694        RegisterID* emitGetFromScope(RegisterID* dst, RegisterID* scope, const Variable&, ResolveMode);
    695695        RegisterID* emitPutToScope(RegisterID* scope, const Variable&, RegisterID* value, ResolveMode, InitializationMode);
     696
     697        RegisterID* emitResolveScopeForHoistingFuncDeclInEval(RegisterID* dst, const Identifier&);
     698
    696699        RegisterID* initializeVariable(const Variable&, RegisterID* value);
    697700
  • trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h

    r215779 r215984  
    28742874        forNode(node).setType(m_graph, SpecObject);
    28752875        break;
    2876        
     2876
     2877    case ResolveScopeForHoistingFuncDeclInEval:
     2878        clobberWorld(node->origin.semantic, clobberLimit);
     2879        forNode(node).makeBytecodeTop();
     2880        break;
     2881
    28772882    case PutGlobalVariable:
    28782883    case NotifyWrite:
    28792884        break;
    2880            
     2885
    28812886    case OverridesHasInstance:
    28822887        forNode(node).setType(SpecBoolean);
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r215779 r215984  
    52065206            }
    52075207            NEXT_OPCODE(op_resolve_scope);
     5208        }
     5209        case op_resolve_scope_for_hoisting_func_decl_in_eval: {
     5210            int dst = currentInstruction[1].u.operand;
     5211            int scope = currentInstruction[2].u.operand;
     5212            unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[currentInstruction[3].u.operand];
     5213
     5214            set(VirtualRegister(dst), addToGraph(ResolveScopeForHoistingFuncDeclInEval, OpInfo(identifierNumber), get(VirtualRegister(scope))));
     5215
     5216            NEXT_OPCODE(op_resolve_scope_for_hoisting_func_decl_in_eval);
    52085217        }
    52095218
  • trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp

    r215779 r215984  
    248248    case op_put_to_scope:
    249249    case op_resolve_scope:
     250    case op_resolve_scope_for_hoisting_func_decl_in_eval:
    250251    case op_new_regexp:
    251252        return CanCompileAndInline;
  • trunk/Source/JavaScriptCore/dfg/DFGClobberize.h

    r215779 r215984  
    574574    case GetDynamicVar:
    575575    case PutDynamicVar:
     576    case ResolveScopeForHoistingFuncDeclInEval:
    576577    case ResolveScope:
    577578        read(World);
  • trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp

    r215779 r215984  
    268268    case GetDynamicVar:
    269269    case PutDynamicVar:
     270    case ResolveScopeForHoistingFuncDeclInEval:
    270271    case ResolveScope:
    271272    case NukeStructureAndSetButterfly:
  • trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp

    r215779 r215984  
    17291729        }
    17301730
     1731        case ResolveScopeForHoistingFuncDeclInEval: {
     1732            fixEdge<KnownCellUse>(node->child1());
     1733            break;
     1734        }
    17311735        case ResolveScope:
    17321736        case GetDynamicVar:
  • trunk/Source/JavaScriptCore/dfg/DFGNode.h

    r215779 r215984  
    949949        case GetDynamicVar:
    950950        case PutDynamicVar:
     951        case ResolveScopeForHoistingFuncDeclInEval:
    951952        case ResolveScope:
    952953            return true;
  • trunk/Source/JavaScriptCore/dfg/DFGNodeType.h

    r215779 r215984  
    227227    macro(SkipScope, NodeResultJS) \
    228228    macro(ResolveScope, NodeResultJS | NodeMustGenerate) \
     229    macro(ResolveScopeForHoistingFuncDeclInEval, NodeResultJS | NodeMustGenerate) \
    229230    macro(GetGlobalObject, NodeResultJS) \
    230231    macro(GetClosureVar, NodeResultJS) \
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r215885 r215984  
    22072207}
    22082208
     2209EncodedJSValue JIT_OPERATION operationResolveScopeForHoistingFuncDeclInEval(ExecState* exec, JSScope* scope, UniquedStringImpl* impl)
     2210{
     2211    VM& vm = exec->vm();
     2212    NativeCallFrameTracer tracer(&vm, exec);
     2213       
     2214    JSValue resolvedScope = JSScope::resolveScopeForHoistingFuncDeclInEval(exec, scope, Identifier::fromUid(exec, impl));
     2215    return JSValue::encode(resolvedScope);
     2216}
     2217   
    22092218JSCell* JIT_OPERATION operationResolveScope(ExecState* exec, JSScope* scope, UniquedStringImpl* impl)
    22102219{
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.h

    r215779 r215984  
    208208
    209209JSCell* JIT_OPERATION operationResolveScope(ExecState*, JSScope*, UniquedStringImpl*);
     210EncodedJSValue JIT_OPERATION operationResolveScopeForHoistingFuncDeclInEval(ExecState*, JSScope*, UniquedStringImpl*);
    210211EncodedJSValue JIT_OPERATION operationGetDynamicVar(ExecState*, JSObject* scope, UniquedStringImpl*, unsigned);
    211212void JIT_OPERATION operationPutDynamicVar(ExecState*, JSObject* scope, EncodedJSValue, UniquedStringImpl*, unsigned);
  • trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp

    r215779 r215984  
    729729        }
    730730
     731        case ResolveScopeForHoistingFuncDeclInEval:
    731732        case GetDynamicVar: {
    732733            setPrediction(SpecBytecodeTop);
  • trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h

    r215779 r215984  
    377377    case GetDynamicVar:
    378378    case PutDynamicVar:
     379    case ResolveScopeForHoistingFuncDeclInEval:
    379380    case ResolveScope:
    380381    case MapHash:
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r215779 r215984  
    94369436}
    94379437
     9438void SpeculativeJIT::compileResolveScopeForHoistingFuncDeclInEval(Node* node)
     9439{
     9440    SpeculateCellOperand scope(this, node->child1());
     9441    GPRReg scopeGPR = scope.gpr();
     9442#if USE(JSVALUE64)
     9443    GPRFlushedCallResult result(this);
     9444    GPRReg resultGPR = result.gpr();
     9445    flushRegisters();
     9446    callOperation(operationResolveScopeForHoistingFuncDeclInEval, resultGPR, scopeGPR, identifierUID(node->identifierNumber()));
     9447    m_jit.exceptionCheck();
     9448    jsValueResult(result.gpr(), node);
     9449#else
     9450    flushRegisters();
     9451    GPRFlushedCallResult2 resultTag(this);
     9452    GPRFlushedCallResult resultPayload(this);
     9453    callOperation(operationResolveScopeForHoistingFuncDeclInEval, JSValueRegs(resultTag.gpr(), resultPayload.gpr()), scopeGPR, identifierUID(node->identifierNumber()));
     9454    m_jit.exceptionCheck();
     9455    jsValueResult(resultTag.gpr(), resultPayload.gpr(), node);
     9456#endif
     9457}
     9458   
    94389459void SpeculativeJIT::compileGetDynamicVar(Node* node)
    94399460{
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    r215779 r215984  
    13761376    }
    13771377
     1378    JITCompiler::Call callOperation(S_JITOperation_EO operation, GPRReg result, GPRReg arg1)
     1379    {
     1380        m_jit.setupArgumentsWithExecState(arg1);
     1381        return appendCallSetResult(operation, result);
     1382    }
     1383
    13781384    JITCompiler::Call callOperation(C_JITOperation_EJscI operation, GPRReg result, GPRReg arg1, UniquedStringImpl* impl)
    13791385    {
     
    14301436    {
    14311437        m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(uid));
     1438        return appendCallSetResult(operation, result);
     1439    }
     1440    JITCompiler::Call callOperation(J_JITOperation_EJscI operation, GPRReg result, GPRReg arg1, UniquedStringImpl* impl)
     1441    {
     1442        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(impl));
    14321443        return appendCallSetResult(operation, result);
    14331444    }
     
    19751986        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2.payloadGPR(), arg2.tagGPR(), arg3.payloadGPR(), arg3.tagGPR(), arg4.payloadGPR(), arg4.tagGPR());
    19761987        return appendCall(operation);
     1988    }
     1989    JITCompiler::Call callOperation(J_JITOperation_EJscI operation, JSValueRegs result, GPRReg arg1, UniquedStringImpl* impl)
     1990    {
     1991        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(impl));
     1992        return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
    19771993    }
    19781994    JITCompiler::Call callOperation(V_JITOperation_EOJJZ operation, GPRReg arg1, JSValueRegs arg2, JSValueRegs arg3, GPRReg arg4)
     
    28712887    void compileCallObjectConstructor(Node*);
    28722888    void compileResolveScope(Node*);
     2889    void compileResolveScopeForHoistingFuncDeclInEval(Node*);
    28732890    void compileGetDynamicVar(Node*);
    28742891    void compilePutDynamicVar(Node*);
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r215779 r215984  
    56115611    }
    56125612
     5613    case ResolveScopeForHoistingFuncDeclInEval: {
     5614        compileResolveScopeForHoistingFuncDeclInEval(node);
     5615        break;
     5616    }
     5617
    56135618    case ResolveScope: {
    56145619        compileResolveScope(node);
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r215779 r215984  
    48784878        break;
    48794879    }
     4880   
     4881    case ResolveScopeForHoistingFuncDeclInEval: {
     4882        compileResolveScopeForHoistingFuncDeclInEval(node);
     4883        break;
     4884    }
    48804885
    48814886    case ResolveScope: {
  • trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp

    r215779 r215984  
    268268    case LogShadowChickenTail:
    269269    case ResolveScope:
     270    case ResolveScopeForHoistingFuncDeclInEval:
    270271    case GetDynamicVar:
    271272    case PutDynamicVar:
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r215779 r215984  
    10811081        case RecordRegExpCachedResult:
    10821082            compileRecordRegExpCachedResult();
     1083            break;
     1084        case ResolveScopeForHoistingFuncDeclInEval:
     1085            compileResolveScopeForHoistingFuncDeclInEval();
    10831086            break;
    10841087        case ResolveScope:
     
    1013910142            RELEASE_ASSERT_NOT_REACHED();
    1014010143        }
     10144    }
     10145
     10146    void compileResolveScopeForHoistingFuncDeclInEval()
     10147    {
     10148        UniquedStringImpl* uid = m_graph.identifiers()[m_node->identifierNumber()];
     10149        setJSValue(vmCall(pointerType(), m_out.operation(operationResolveScopeForHoistingFuncDeclInEval), m_callFrame, lowCell(m_node->child1()), m_out.constIntPtr(uid)));
    1014110150    }
    1014210151
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r215854 r215984  
    11001100
    11011101    unsigned numVariables = eval->numVariables();
    1102     int numFunctions = eval->numberOfFunctionDecls();
     1102    unsigned numTopLevelFunctionDecls = eval->numTopLevelFunctionDecls();
     1103    unsigned numFunctionHoistingCandidates = eval->numFunctionHoistingCandidates();
    11031104
    11041105    JSScope* variableObject;
    1105     if ((numVariables || numFunctions) && eval->isStrictMode()) {
     1106    if ((numVariables || numTopLevelFunctionDecls) && eval->isStrictMode()) {
    11061107        scope = StrictEvalActivation::create(callFrame, scope);
    11071108        variableObject = scope;
     
    11341135
    11351136    // We can't declare a "var"/"function" that overwrites a global "let"/"const"/"class" in a sloppy-mode eval.
    1136     if (variableObject->isGlobalObject() && !eval->isStrictMode() && (numVariables || numFunctions)) {
     1137    if (variableObject->isGlobalObject() && !eval->isStrictMode() && (numVariables || numTopLevelFunctionDecls)) {
    11371138        JSGlobalLexicalEnvironment* globalLexicalEnvironment = jsCast<JSGlobalObject*>(variableObject)->globalLexicalEnvironment();
    11381139        for (unsigned i = 0; i < numVariables; ++i) {
     
    11441145        }
    11451146
    1146         for (int i = 0; i < numFunctions; ++i) {
     1147        for (unsigned i = 0; i < numTopLevelFunctionDecls; ++i) {
    11471148            FunctionExecutable* function = codeBlock->functionDecl(i);
    11481149            PropertySlot slot(globalLexicalEnvironment, PropertySlot::InternalMethodType::VMInquiry);
     
    11561157        variableObject->flattenDictionaryObject(vm);
    11571158
    1158     if (numVariables || numFunctions) {
     1159    if (numVariables || numTopLevelFunctionDecls || numFunctionHoistingCandidates) {
    11591160        BatchedTransitionOptimizer optimizer(vm, variableObject);
    11601161        if (variableObject->next() && !eval->isStrictMode())
     
    11731174            }
    11741175        }
    1175 
    1176         for (int i = 0; i < numFunctions; ++i) {
    1177             FunctionExecutable* function = codeBlock->functionDecl(i);
    1178             PutPropertySlot slot(variableObject);
    1179             variableObject->methodTable()->put(variableObject, callFrame, function->name(), JSFunction::create(vm, function, scope), slot);
    1180             RETURN_IF_EXCEPTION(throwScope, checkedReturn(throwScope.exception()));
     1176       
     1177        if (eval->isStrictMode()) {
     1178            for (unsigned i = 0; i < numTopLevelFunctionDecls; ++i) {
     1179                FunctionExecutable* function = codeBlock->functionDecl(i);
     1180                PutPropertySlot slot(variableObject);
     1181                variableObject->methodTable()->put(variableObject, callFrame, function->name(), JSFunction::create(vm, function, scope), slot);
     1182            }
     1183        } else {
     1184            for (unsigned i = 0; i < numTopLevelFunctionDecls; ++i) {
     1185                FunctionExecutable* function = codeBlock->functionDecl(i);
     1186                JSValue resolvedScope = JSScope::resolveScopeForHoistingFuncDeclInEval(callFrame, scope, function->name());
     1187                if (resolvedScope.isUndefined())
     1188                    return checkedReturn(throwSyntaxError(callFrame, throwScope, makeString("Can't create duplicate variable in eval: '", String(function->name().impl()), "'")));
     1189                PutPropertySlot slot(variableObject);
     1190                variableObject->methodTable()->put(variableObject, callFrame, function->name(), JSFunction::create(vm, function, scope), slot);
     1191                RETURN_IF_EXCEPTION(throwScope, checkedReturn(throwScope.exception()));
     1192            }
     1193
     1194            for (unsigned i = 0; i < numFunctionHoistingCandidates; ++i) {
     1195                const Identifier& ident = codeBlock->functionHoistingCandidate(i);
     1196                JSValue resolvedScope = JSScope::resolveScopeForHoistingFuncDeclInEval(callFrame, scope, ident);
     1197                if (!resolvedScope.isUndefined()) {
     1198                    if (!variableObject->hasProperty(callFrame, ident)) {
     1199                        PutPropertySlot slot(variableObject);
     1200                        variableObject->methodTable()->put(variableObject, callFrame, ident, jsUndefined(), slot);
     1201                        RETURN_IF_EXCEPTION(throwScope, checkedReturn(throwScope.exception()));
     1202                    }
     1203                }
     1204            }
    11811205        }
    11821206    }
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r215779 r215984  
    393393
    394394        DEFINE_OP(op_resolve_scope)
     395        DEFINE_OP(op_resolve_scope_for_hoisting_func_decl_in_eval)
    395396        DEFINE_OP(op_get_from_scope)
    396397        DEFINE_OP(op_put_to_scope)
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r215779 r215984  
    666666
    667667        void emit_op_resolve_scope(Instruction*);
     668        void emit_op_resolve_scope_for_hoisting_func_decl_in_eval(Instruction*);
    668669        void emit_op_get_from_scope(Instruction*);
    669670        void emit_op_put_to_scope(Instruction*);
  • trunk/Source/JavaScriptCore/jit/JITOperations.h

    r215779 r215984  
    154154typedef EncodedJSValue (JIT_OPERATION *J_JITOperation_EJJMic)(ExecState*, EncodedJSValue, EncodedJSValue, void*);
    155155typedef EncodedJSValue (JIT_OPERATION *J_JITOperation_EJMic)(ExecState*, EncodedJSValue, void*);
     156typedef EncodedJSValue (JIT_OPERATION *J_JITOperation_EJscI)(ExecState*, JSScope*, UniquedStringImpl*);
    156157typedef EncodedJSValue (JIT_OPERATION *J_JITOperation_EJssZ)(ExecState*, JSString*, int32_t);
    157158typedef EncodedJSValue (JIT_OPERATION *J_JITOperation_EJss)(ExecState*, JSString*);
     
    233234typedef int32_t (JIT_OPERATION *Z_JITOperation_EOI)(ExecState*, JSObject*, UniquedStringImpl*);
    234235typedef int32_t (JIT_OPERATION *Z_JITOperation_EOJ)(ExecState*, JSObject*, EncodedJSValue);
     236typedef size_t (JIT_OPERATION *S_JITOperation_EO)(ExecState*, JSObject*);
    235237typedef size_t (JIT_OPERATION *S_JITOperation_ECC)(ExecState*, JSCell*, JSCell*);
    236238typedef size_t (JIT_OPERATION *S_JITOperation_EGC)(ExecState*, JSGlobalObject*, JSCell*);
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp

    r215779 r215984  
    763763        loadPtr(Address(regT0, JSScope::offsetOfNext()), regT0);
    764764    emitPutVirtualRegister(dst);
     765}
     766
     767void JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval(Instruction* currentInstruction)
     768{
     769    JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_resolve_scope_for_hoisting_func_decl_in_eval);
     770    slowPathCall.call();
    765771}
    766772
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp

    r215779 r215984  
    772772}
    773773
     774void JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval(Instruction* currentInstruction)
     775{
     776    JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_resolve_scope_for_hoisting_func_decl_in_eval);
     777    slowPathCall.call();
     778}
     779   
    774780void JIT::emit_op_resolve_scope(Instruction* currentInstruction)
    775781{
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm

    r215779 r215984  
    18321832    dispatch(5)
    18331833
     1834_llint_op_resolve_scope_for_hoisting_func_decl_in_eval:
     1835    traceExecution()
     1836    callOpcodeSlowPath(_slow_path_resolve_scope_for_hoisting_func_decl_in_eval)
     1837    dispatch(4)
     1838
    18341839# Lastly, make sure that we can link even though we don't support all opcodes.
    18351840# These opcodes should never arise when using LLInt or either JIT. We assert
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r215779 r215984  
    17941794    semanticFailIfTrue(strictMode(), "Function declarations are only allowed inside blocks or switch statements in strict mode");
    17951795    failIfFalse(parentAllowsFunctionDeclarationAsStatement, "Function declarations are only allowed inside block statements or at the top level of a program");
    1796     if (!currentScope()->isFunction()) {
    1797         // We only implement annex B.3.3 if we're in function mode. Otherwise, we fall back
     1796    if (!currentScope()->isFunction() && !closestParentOrdinaryFunctionNonLexicalScope()->isEvalContext()) {
     1797        // We only implement annex B.3.3 if we're in function mode or eval mode. Otherwise, we fall back
    17981798        // to hoisting behavior.
    17991799        // FIXME: https://bugs.webkit.org/show_bug.cgi?id=155813
  • trunk/Source/JavaScriptCore/parser/Parser.h

    r215977 r215984  
    612612                    auto addResult = m_declaredVariables.add(function);
    613613                    addResult.iterator->value.setIsVar();
     614                    addResult.iterator->value.setIsSloppyModeHoistingCandidate();
    614615                    sloppyModeHoistedFunctions.add(function);
    615616                }
     
    11991200    std::pair<DeclarationResultMask, ScopeRef> declareFunction(const Identifier* ident)
    12001201    {
    1201         if (m_statementDepth == 1 || (!strictMode() && !currentScope()->isFunction())) {
     1202        if ((m_statementDepth == 1) || (!strictMode() && !currentScope()->isFunction() && !closestParentOrdinaryFunctionNonLexicalScope()->isEvalContext())) {
    12021203            // Functions declared at the top-most scope (both in sloppy and strict mode) are declared as vars
    12031204            // for backwards compatibility. This allows us to declare functions with the same name more than once.
     
    12101211
    12111212        if (!strictMode()) {
    1212             ASSERT(currentScope()->isFunction());
     1213            ASSERT(currentScope()->isFunction() || closestParentOrdinaryFunctionNonLexicalScope()->isEvalContext());
    12131214
    12141215            // Functions declared inside a function inside a nested block scope in sloppy mode are subject to this
  • trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp

    r215885 r215984  
    813813}
    814814
     815SLOW_PATH_DECL(slow_path_resolve_scope_for_hoisting_func_decl_in_eval)
     816{
     817    BEGIN();
     818    const Identifier& ident = exec->codeBlock()->identifier(pc[3].u.operand);
     819    JSScope* scope = exec->uncheckedR(pc[2].u.operand).Register::scope();
     820    JSValue resolvedScope = JSScope::resolveScopeForHoistingFuncDeclInEval(exec, scope, ident);
     821
     822    CHECK_EXCEPTION();
     823
     824    RETURN(resolvedScope);
     825}
     826
    815827SLOW_PATH_DECL(slow_path_resolve_scope)
    816828{
  • trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h

    r215779 r215984  
    258258SLOW_PATH_HIDDEN_DECL(slow_path_push_with_scope);
    259259SLOW_PATH_HIDDEN_DECL(slow_path_resolve_scope);
     260SLOW_PATH_HIDDEN_DECL(slow_path_is_var_scope);
     261SLOW_PATH_HIDDEN_DECL(slow_path_resolve_scope_for_hoisting_func_decl_in_eval);
    260262SLOW_PATH_HIDDEN_DECL(slow_path_create_rest);
    261263SLOW_PATH_HIDDEN_DECL(slow_path_get_by_id_with_this);
  • trunk/Source/JavaScriptCore/runtime/EvalExecutable.h

    r215779 r215984  
    5959
    6060    unsigned numVariables() { return m_unlinkedEvalCodeBlock->numVariables(); }
    61     unsigned numberOfFunctionDecls() { return m_unlinkedEvalCodeBlock->numberOfFunctionDecls(); }
     61    unsigned numFunctionHoistingCandidates() { return m_unlinkedEvalCodeBlock->numFunctionHoistingCandidates(); }
     62    unsigned numTopLevelFunctionDecls() { return m_unlinkedEvalCodeBlock->numberOfFunctionDecls(); }
    6263
    6364protected:
  • trunk/Source/JavaScriptCore/runtime/JSScope.cpp

    r215779 r215984  
    212212}
    213213
    214 JSObject* JSScope::resolve(ExecState* exec, JSScope* scope, const Identifier& ident)
     214template<typename ReturnPredicateFunctor, typename SkipPredicateFunctor>
     215ALWAYS_INLINE JSObject* JSScope::resolve(ExecState* exec, JSScope* scope, const Identifier& ident, ReturnPredicateFunctor returnPredicate, SkipPredicateFunctor skipPredicate)
    215216{
    216217    VM& vm = exec->vm();
     
    239240        }
    240241
     242        if (skipPredicate(scope))
     243            continue;
     244
    241245        bool hasProperty = object->hasProperty(exec, ident);
    242246        RETURN_IF_EXCEPTION(throwScope, nullptr);
     
    247251                return object;
    248252        }
    249     }
     253
     254        if (returnPredicate(scope))
     255            return object;
     256    }
     257}
     258
     259JSValue JSScope::resolveScopeForHoistingFuncDeclInEval(ExecState* exec, JSScope* scope, const Identifier& ident)
     260{
     261    auto returnPredicate = [&] (JSScope* scope) -> bool {
     262        return scope->isVarScope();
     263    };
     264    auto skipPredicate = [&] (JSScope* scope) -> bool {
     265        return scope->isWithScope();
     266    };
     267    JSObject* object = resolve(exec, scope, ident, returnPredicate, skipPredicate);
     268   
     269    bool result = false;
     270    if (JSScope* scope = jsDynamicCast<JSScope*>(exec->vm(), object)) {
     271        if (SymbolTable* scopeSymbolTable = scope->symbolTable(exec->vm())) {
     272            result = scope->isGlobalObject()
     273                ? JSObject::isExtensible(object, exec)
     274                : scopeSymbolTable->scopeType() == SymbolTable::ScopeType::VarScope;
     275        }
     276    }
     277
     278    return result ? JSValue(object) : jsUndefined();
     279}
     280
     281JSObject* JSScope::resolve(ExecState* exec, JSScope* scope, const Identifier& ident)
     282{
     283    auto predicate1 = [&] (JSScope*) -> bool {
     284        return false;
     285    };
     286    auto predicate2 = [&] (JSScope*) -> bool {
     287        return false;
     288    };
     289    return resolve(exec, scope, ident, predicate1, predicate2);
    250290}
    251291
  • trunk/Source/JavaScriptCore/runtime/JSScope.h

    r215779 r215984  
    4747
    4848    static JSObject* resolve(ExecState*, JSScope*, const Identifier&);
     49    static JSValue resolveScopeForHoistingFuncDeclInEval(ExecState*, JSScope*, const Identifier&);
    4950    static ResolveOp abstractResolve(ExecState*, size_t depthOffset, JSScope*, const Identifier&, GetOrPut, ResolveType, InitializationMode);
    5051
     
    7677protected:
    7778    JSScope(VM&, Structure*, JSScope* next);
     79
     80    template<typename ReturnPredicateFunctor, typename SkipPredicateFunctor>
     81    static JSObject* resolve(ExecState*, JSScope*, const Identifier&, ReturnPredicateFunctor, SkipPredicateFunctor);
    7882
    7983private:
Note: See TracChangeset for help on using the changeset viewer.