Changeset 192876 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Dec 1, 2015, 1:46:12 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r192874 r192876 1 2015-12-01 Aleksandr Skachkov <[email protected]> 2 3 [ES6] "super" and "this" should be lexically bound inside an arrow function and should live in a JSLexicalEnvironment 4 https://bugs.webkit.org/show_bug.cgi?id=149338 5 6 Reviewed by Saam Barati. 7 8 Implemented new version of the lexically bound 'this' in arrow function. In current version 9 'this' is stored inside of the lexical environment of the function. To store and load we use 10 op_get_from_scope and op_put_to_scope operations. Also new implementation prevent raising TDZ 11 error for arrow functions that are declared before super() but invoke after. 12 13 * builtins/BuiltinExecutables.cpp: 14 (JSC::createExecutableInternal): 15 * bytecode/BytecodeList.json: 16 * bytecode/BytecodeUseDef.h: 17 * bytecode/CodeBlock.cpp: 18 (JSC::CodeBlock::dumpBytecode): 19 * bytecode/EvalCodeCache.h: 20 (JSC::EvalCodeCache::getSlow): 21 * bytecode/ExecutableInfo.h: 22 (JSC::ExecutableInfo::ExecutableInfo): 23 (JSC::ExecutableInfo::isDerivedConstructorContext): 24 (JSC::ExecutableInfo::isArrowFunctionContext): 25 * bytecode/UnlinkedCodeBlock.cpp: 26 (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): 27 * bytecode/UnlinkedCodeBlock.h: 28 (JSC::UnlinkedCodeBlock::isDerivedConstructorContext): 29 (JSC::UnlinkedCodeBlock::isArrowFunctionContext): 30 * bytecode/UnlinkedFunctionExecutable.cpp: 31 (JSC::generateUnlinkedFunctionCodeBlock): 32 (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): 33 * bytecode/UnlinkedFunctionExecutable.h: 34 * bytecompiler/BytecodeGenerator.cpp: 35 (JSC::BytecodeGenerator::BytecodeGenerator): 36 (JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded): 37 (JSC::BytecodeGenerator::variable): 38 (JSC::BytecodeGenerator::emitLoadArrowFunctionLexicalEnvironment): 39 (JSC::BytecodeGenerator::emitLoadThisFromArrowFunctionLexicalEnvironment): 40 (JSC::BytecodeGenerator::emitLoadNewTargetFromArrowFunctionLexicalEnvironment): 41 (JSC::BytecodeGenerator::emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment): 42 (JSC::BytecodeGenerator::emitPutNewTargetToArrowFunctionContextScope): 43 (JSC::BytecodeGenerator::emitPutDerivedConstructorToArrowFunctionContextScope): 44 (JSC::BytecodeGenerator::emitPutThisToArrowFunctionContextScope): 45 * bytecompiler/BytecodeGenerator.h: 46 (JSC::BytecodeGenerator::isDerivedConstructorContext): 47 (JSC::BytecodeGenerator::usesArrowFunction): 48 (JSC::BytecodeGenerator::needsToUpdateArrowFunctionContext): 49 (JSC::BytecodeGenerator::usesEval): 50 (JSC::BytecodeGenerator::usesThis): 51 (JSC::BytecodeGenerator::newTarget): 52 (JSC::BytecodeGenerator::makeFunction): 53 * bytecompiler/NodesCodegen.cpp: 54 (JSC::ThisNode::emitBytecode): 55 (JSC::SuperNode::emitBytecode): 56 (JSC::EvalFunctionCallNode::emitBytecode): 57 (JSC::FunctionCallValueNode::emitBytecode): 58 (JSC::FunctionNode::emitBytecode): 59 * debugger/DebuggerCallFrame.cpp: 60 (JSC::DebuggerCallFrame::evaluate): 61 * dfg/DFGAbstractInterpreterInlines.h: 62 * dfg/DFGByteCodeParser.cpp: 63 (JSC::DFG::ByteCodeParser::parseBlock): 64 * dfg/DFGCapabilities.cpp: 65 * dfg/DFGClobberize.h: 66 * dfg/DFGDoesGC.cpp: 67 * dfg/DFGFixupPhase.cpp: 68 * dfg/DFGNodeType.h: 69 * dfg/DFGObjectAllocationSinkingPhase.cpp: 70 * dfg/DFGPredictionPropagationPhase.cpp: 71 * dfg/DFGPromotedHeapLocation.cpp: 72 * dfg/DFGPromotedHeapLocation.h: 73 * dfg/DFGSafeToExecute.h: 74 * dfg/DFGSpeculativeJIT.cpp: 75 * dfg/DFGSpeculativeJIT.h: 76 * dfg/DFGSpeculativeJIT32_64.cpp: 77 * dfg/DFGSpeculativeJIT64.cpp: 78 * ftl/FTLCapabilities.cpp: 79 * ftl/FTLLowerDFGToLLVM.cpp: 80 * ftl/FTLOperations.cpp: 81 (JSC::FTL::operationMaterializeObjectInOSR): 82 * interpreter/Interpreter.cpp: 83 (JSC::eval): 84 * jit/JIT.cpp: 85 * jit/JIT.h: 86 * jit/JITOpcodes.cpp: 87 (JSC::JIT::emitNewFuncExprCommon): 88 * jit/JITOpcodes32_64.cpp: 89 * llint/LLIntSlowPaths.cpp: 90 (JSC::LLInt::LLINT_SLOW_PATH_DECL): 91 * llint/LowLevelInterpreter.asm: 92 * llint/LowLevelInterpreter32_64.asm: 93 * llint/LowLevelInterpreter64.asm: 94 * parser/ASTBuilder.h: 95 (JSC::ASTBuilder::createArrowFunctionExpr): 96 (JSC::ASTBuilder::usesArrowFunction): 97 * parser/Nodes.h: 98 (JSC::ScopeNode::usesArrowFunction): 99 * parser/Parser.cpp: 100 (JSC::Parser<LexerType>::parseFunctionInfo): 101 * parser/ParserModes.h: 102 * runtime/CodeCache.cpp: 103 (JSC::CodeCache::getGlobalCodeBlock): 104 (JSC::CodeCache::getProgramCodeBlock): 105 (JSC::CodeCache::getEvalCodeBlock): 106 (JSC::CodeCache::getModuleProgramCodeBlock): 107 (JSC::CodeCache::getFunctionExecutableFromGlobalCode): 108 * runtime/CodeCache.h: 109 * runtime/CommonIdentifiers.h: 110 * runtime/CommonSlowPaths.cpp: 111 (JSC::SLOW_PATH_DECL): 112 * runtime/Executable.cpp: 113 (JSC::ScriptExecutable::ScriptExecutable): 114 (JSC::EvalExecutable::create): 115 (JSC::EvalExecutable::EvalExecutable): 116 (JSC::ProgramExecutable::ProgramExecutable): 117 (JSC::ModuleProgramExecutable::ModuleProgramExecutable): 118 (JSC::FunctionExecutable::FunctionExecutable): 119 * runtime/Executable.h: 120 (JSC::ScriptExecutable::isArrowFunctionContext): 121 (JSC::ScriptExecutable::isDerivedConstructorContext): 122 * runtime/JSGlobalObject.cpp: 123 (JSC::JSGlobalObject::createEvalCodeBlock): 124 * runtime/JSGlobalObject.h: 125 * runtime/JSGlobalObjectFunctions.cpp: 126 (JSC::globalFuncEval): 127 * tests/es6.yaml: 128 * tests/stress/arrowfunction-activation-sink-osrexit.js: 129 * tests/stress/arrowfunction-activation-sink.js: 130 * tests/stress/arrowfunction-lexical-bind-newtarget.js: Added. 131 * tests/stress/arrowfunction-lexical-bind-supercall-1.js: Added. 132 * tests/stress/arrowfunction-lexical-bind-supercall-2.js: Added. 133 * tests/stress/arrowfunction-lexical-bind-supercall-3.js: Added. 134 * tests/stress/arrowfunction-lexical-bind-supercall-4.js: Added. 135 * tests/stress/arrowfunction-lexical-bind-this-1.js: 136 * tests/stress/arrowfunction-lexical-bind-this-7.js: Added. 137 * tests/stress/arrowfunction-tdz-1.js: Added. 138 * tests/stress/arrowfunction-tdz-2.js: Added. 139 * tests/stress/arrowfunction-tdz-3.js: Added. 140 * tests/stress/arrowfunction-tdz-4.js: Added. 141 * tests/stress/arrowfunction-tdz.js: Removed. 142 1 143 2015-12-01 Youenn Fablet <[email protected]> 2 144
Note:
See TracChangeset
for help on using the changeset viewer.