Changeset 163225 in webkit for trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
- Timestamp:
- Jan 31, 2014, 5:37:59 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
r163195 r163225 50 50 const ClassInfo UnlinkedFunctionCodeBlock::s_info = { "UnlinkedFunctionCodeBlock", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(UnlinkedFunctionCodeBlock) }; 51 51 52 static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(VM& vm, UnlinkedFunctionExecutable* executable, const SourceCode& source, CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, UnlinkedFunctionKind functionKind,ParserError& error)53 { 54 RefPtr<FunctionBodyNode> body = parse<FunctionBodyNode>(&vm, source, executable->parameters(), executable->name(), executable-> toStrictness(), JSParseFunctionCode, error);52 static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(VM& vm, UnlinkedFunctionExecutable* executable, const SourceCode& source, CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error) 53 { 54 RefPtr<FunctionBodyNode> body = parse<FunctionBodyNode>(&vm, source, executable->parameters(), executable->name(), executable->isInStrictContext() ? JSParseStrict : JSParseNormal, JSParseFunctionCode, error); 55 55 56 56 if (!body) { … … 64 64 executable->recordParse(body->features(), body->hasCapturedVariables()); 65 65 66 UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&vm, FunctionCode, ExecutableInfo(body->needsActivation(), body->usesEval(), body->isStrictMode(), kind == CodeForConstruct , functionKind == UnlinkedBuiltinFunction));66 UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&vm, FunctionCode, ExecutableInfo(body->needsActivation(), body->usesEval(), body->isStrictMode(), kind == CodeForConstruct)); 67 67 OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(vm, body.get(), result, debuggerMode, profilerMode))); 68 68 error = generator->generate(); … … 83 83 } 84 84 85 UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, FunctionBodyNode* node, bool isFromGlobalCode , UnlinkedFunctionKind kind)85 UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, FunctionBodyNode* node, bool isFromGlobalCode) 86 86 : Base(*vm, structure) 87 87 , m_numCapturedVariables(node->capturedVariableCount()) … … 90 90 , m_hasCapturedVariables(node->hasCapturedVariables()) 91 91 , m_isFromGlobalCode(isFromGlobalCode) 92 , m_isBuiltinFunction(kind == UnlinkedBuiltinFunction)93 92 , m_name(node->ident()) 94 93 , m_inferredName(node->inferredName()) … … 168 167 } 169 168 170 UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(vm, this, source, specializationKind, debuggerMode, profilerMode, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction,error);169 UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(vm, this, source, specializationKind, debuggerMode, profilerMode, error); 171 170 172 171 if (error.m_type != ParserError::ErrorNone) … … 212 211 , m_isConstructor(info.m_isConstructor) 213 212 , m_hasCapturedVariables(false) 214 , m_isBuiltinFunction(info.m_isBuiltinFunction)215 213 , m_firstLine(0) 216 214 , m_lineCount(0)
Note:
See TracChangeset
for help on using the changeset viewer.