Changeset 193584 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Dec 6, 2015, 12:56:30 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r193566 r193584 1 2015-12-05 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::isArrowFunction): 29 (JSC::UnlinkedCodeBlock::isDerivedConstructorContext): 30 (JSC::UnlinkedCodeBlock::isArrowFunctionContext): 31 * bytecode/UnlinkedFunctionExecutable.cpp: 32 (JSC::generateUnlinkedFunctionCodeBlock): 33 (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): 34 * bytecode/UnlinkedFunctionExecutable.h: 35 * bytecompiler/BytecodeGenerator.cpp: 36 (JSC::BytecodeGenerator::BytecodeGenerator): 37 (JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded): 38 (JSC::BytecodeGenerator::variable): 39 (JSC::BytecodeGenerator::emitNewArrowFunctionExpression): 40 (JSC::BytecodeGenerator::emitLoadArrowFunctionLexicalEnvironment): 41 (JSC::BytecodeGenerator::emitLoadThisFromArrowFunctionLexicalEnvironment): 42 (JSC::BytecodeGenerator::emitLoadNewTargetFromArrowFunctionLexicalEnvironment): 43 (JSC::BytecodeGenerator::emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment): 44 (JSC::BytecodeGenerator::emitPutNewTargetToArrowFunctionContextScope): 45 (JSC::BytecodeGenerator::emitPutDerivedConstructorToArrowFunctionContextScope): 46 (JSC::BytecodeGenerator::emitPutThisToArrowFunctionContextScope): 47 * bytecompiler/BytecodeGenerator.h: 48 (JSC::BytecodeGenerator::isDerivedConstructorContext): 49 (JSC::BytecodeGenerator::usesArrowFunction): 50 (JSC::BytecodeGenerator::needsToUpdateArrowFunctionContext): 51 (JSC::BytecodeGenerator::usesEval): 52 (JSC::BytecodeGenerator::usesThis): 53 (JSC::BytecodeGenerator::newTarget): 54 (JSC::BytecodeGenerator::makeFunction): 55 * bytecompiler/NodesCodegen.cpp: 56 (JSC::ThisNode::emitBytecode): 57 (JSC::SuperNode::emitBytecode): 58 (JSC::EvalFunctionCallNode::emitBytecode): 59 (JSC::FunctionCallValueNode::emitBytecode): 60 (JSC::FunctionNode::emitBytecode): 61 * debugger/DebuggerCallFrame.cpp: 62 (JSC::DebuggerCallFrame::evaluate): 63 * dfg/DFGAbstractInterpreterInlines.h: 64 * dfg/DFGByteCodeParser.cpp: 65 (JSC::DFG::ByteCodeParser::parseBlock): 66 * dfg/DFGCapabilities.cpp: 67 * dfg/DFGClobberize.h: 68 * dfg/DFGDoesGC.cpp: 69 * dfg/DFGFixupPhase.cpp: 70 * dfg/DFGNodeType.h: 71 * dfg/DFGObjectAllocationSinkingPhase.cpp: 72 * dfg/DFGPredictionPropagationPhase.cpp: 73 * dfg/DFGPromotedHeapLocation.cpp: 74 * dfg/DFGPromotedHeapLocation.h: 75 * dfg/DFGSafeToExecute.h: 76 * dfg/DFGSpeculativeJIT.cpp: 77 * dfg/DFGSpeculativeJIT.h: 78 * dfg/DFGSpeculativeJIT32_64.cpp: 79 * dfg/DFGSpeculativeJIT64.cpp: 80 * ftl/FTLCapabilities.cpp: 81 * ftl/FTLLowerDFGToLLVM.cpp: 82 * ftl/FTLOperations.cpp: 83 (JSC::FTL::operationMaterializeObjectInOSR): 84 * interpreter/Interpreter.cpp: 85 (JSC::eval): 86 * jit/JIT.cpp: 87 * jit/JIT.h: 88 * jit/JITOpcodes.cpp: 89 (JSC::JIT::emitNewFuncExprCommon): 90 * jit/JITOpcodes32_64.cpp: 91 * llint/LLIntSlowPaths.cpp: 92 (JSC::LLInt::LLINT_SLOW_PATH_DECL): 93 * llint/LowLevelInterpreter.asm: 94 * llint/LowLevelInterpreter32_64.asm: 95 * llint/LowLevelInterpreter64.asm: 96 * parser/ASTBuilder.h: 97 (JSC::ASTBuilder::createArrowFunctionExpr): 98 (JSC::ASTBuilder::usesArrowFunction): 99 * parser/Nodes.h: 100 (JSC::ScopeNode::usesArrowFunction): 101 * parser/Parser.cpp: 102 (JSC::Parser<LexerType>::parseFunctionInfo): 103 * parser/ParserModes.h: 104 * runtime/CodeCache.cpp: 105 (JSC::CodeCache::getGlobalCodeBlock): 106 (JSC::CodeCache::getProgramCodeBlock): 107 (JSC::CodeCache::getEvalCodeBlock): 108 (JSC::CodeCache::getModuleProgramCodeBlock): 109 (JSC::CodeCache::getFunctionExecutableFromGlobalCode): 110 * runtime/CodeCache.h: 111 * runtime/CommonIdentifiers.h: 112 * runtime/CommonSlowPaths.cpp: 113 (JSC::SLOW_PATH_DECL): 114 * runtime/Executable.cpp: 115 (JSC::ScriptExecutable::ScriptExecutable): 116 (JSC::EvalExecutable::create): 117 (JSC::EvalExecutable::EvalExecutable): 118 (JSC::ProgramExecutable::ProgramExecutable): 119 (JSC::ModuleProgramExecutable::ModuleProgramExecutable): 120 (JSC::FunctionExecutable::FunctionExecutable): 121 * runtime/Executable.h: 122 (JSC::ScriptExecutable::isArrowFunctionContext): 123 (JSC::ScriptExecutable::isDerivedConstructorContext): 124 * runtime/JSGlobalObject.cpp: 125 (JSC::JSGlobalObject::createEvalCodeBlock): 126 * runtime/JSGlobalObject.h: 127 * runtime/JSGlobalObjectFunctions.cpp: 128 (JSC::globalFuncEval): 129 * tests/es6.yaml: 130 * tests/stress/arrowfunction-activation-sink-osrexit.js: 131 * tests/stress/arrowfunction-activation-sink.js: 132 * tests/stress/arrowfunction-lexical-bind-newtarget.js: Added. 133 * tests/stress/arrowfunction-lexical-bind-supercall-1.js: Added. 134 * tests/stress/arrowfunction-lexical-bind-supercall-2.js: Added. 135 * tests/stress/arrowfunction-lexical-bind-supercall-3.js: Added. 136 * tests/stress/arrowfunction-lexical-bind-supercall-4.js: Added. 137 * tests/stress/arrowfunction-lexical-bind-this-1.js: 138 * tests/stress/arrowfunction-lexical-bind-this-7.js: Added. 139 * tests/stress/arrowfunction-tdz-1.js: Added. 140 * tests/stress/arrowfunction-tdz-2.js: Added. 141 * tests/stress/arrowfunction-tdz-3.js: Added. 142 * tests/stress/arrowfunction-tdz-4.js: Added. 143 * tests/stress/arrowfunction-tdz.js: Removed. 144 1 145 2015-12-05 Benjamin Poulain <[email protected]> 2 146
Note:
See TracChangeset
for help on using the changeset viewer.