Changeset 192935 in webkit for trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp
- Timestamp:
- Dec 1, 2015, 5:37:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp
r192914 r192935 51 51 VM& vm, UnlinkedFunctionExecutable* executable, const SourceCode& source, 52 52 CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, 53 UnlinkedFunctionKind functionKind, ParserError& error, SourceParseMode parseMode)53 UnlinkedFunctionKind functionKind, ParserError& error, bool isArrowFunction) 54 54 { 55 55 JSParserBuiltinMode builtinMode = executable->isBuiltinFunction() ? JSParserBuiltinMode::Builtin : JSParserBuiltinMode::NotBuiltin; … … 57 57 ASSERT(isFunctionParseMode(executable->parseMode())); 58 58 std::unique_ptr<FunctionNode> function = parse<FunctionNode>( 59 &vm, source, executable->name(), builtinMode, strictMode, executable->parseMode(), e xecutable->superBinding(), error, nullptr);59 &vm, source, executable->name(), builtinMode, strictMode, executable->parseMode(), error, nullptr); 60 60 61 61 if (!function) { … … 68 68 69 69 UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&vm, FunctionCode, 70 ExecutableInfo(function->needsActivation(), function->usesEval(), function->isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction, executable->constructorKind(), executable->generatorThisMode(), executable->superBinding(), parseMode));70 ExecutableInfo(function->needsActivation(), function->usesEval(), function->isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction, executable->constructorKind(), isArrowFunction)); 71 71 auto generator(std::make_unique<BytecodeGenerator>(vm, function.get(), result, debuggerMode, profilerMode, executable->parentScopeTDZVariables())); 72 72 error = generator->generate(); … … 76 76 } 77 77 78 UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, RefPtr<SourceProvider>&& sourceOverride, FunctionMetadataNode* node, UnlinkedFunctionKind kind, ConstructAbility constructAbility, GeneratorThisMode generatorThisMode,VariableEnvironment& parentScopeTDZVariables)78 UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, RefPtr<SourceProvider>&& sourceOverride, FunctionMetadataNode* node, UnlinkedFunctionKind kind, ConstructAbility constructAbility, VariableEnvironment& parentScopeTDZVariables) 79 79 : Base(*vm, structure) 80 80 , m_name(node->ident()) … … 100 100 , m_constructorKind(static_cast<unsigned>(node->constructorKind())) 101 101 , m_functionMode(node->functionMode()) 102 , m_generatorThisMode(static_cast<unsigned>(generatorThisMode)) 103 , m_superBinding(static_cast<unsigned>(node->superBinding())) 102 , m_isArrowFunction(node->isArrowFunction()) 104 103 { 105 104 ASSERT(m_constructorKind == static_cast<unsigned>(node->constructorKind())); … … 182 181 UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::unlinkedCodeBlockFor( 183 182 VM& vm, const SourceCode& source, CodeSpecializationKind specializationKind, 184 DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error, SourceParseMode parseMode)183 DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error, bool isArrowFunction) 185 184 { 186 185 switch (specializationKind) { … … 198 197 vm, this, source, specializationKind, debuggerMode, profilerMode, 199 198 isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, 200 error, parseMode);199 error, isArrowFunction); 201 200 202 201 if (error.isValid())
Note:
See TracChangeset
for help on using the changeset viewer.