Ignore:
Timestamp:
Jan 31, 2014, 5:37:59 PM (12 years ago)
Author:
[email protected]
Message:

2014-01-31 Oliver Hunt <[email protected]>

Rollout r163195 and related patches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp

    r163195 r163225  
    5050const ClassInfo UnlinkedFunctionCodeBlock::s_info = { "UnlinkedFunctionCodeBlock", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(UnlinkedFunctionCodeBlock) };
    5151
    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);
     52static 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);
    5555
    5656    if (!body) {
     
    6464    executable->recordParse(body->features(), body->hasCapturedVariables());
    6565   
    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));
    6767    OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(vm, body.get(), result, debuggerMode, profilerMode)));
    6868    error = generator->generate();
     
    8383}
    8484
    85 UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, FunctionBodyNode* node, bool isFromGlobalCode, UnlinkedFunctionKind kind)
     85UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, FunctionBodyNode* node, bool isFromGlobalCode)
    8686    : Base(*vm, structure)
    8787    , m_numCapturedVariables(node->capturedVariableCount())
     
    9090    , m_hasCapturedVariables(node->hasCapturedVariables())
    9191    , m_isFromGlobalCode(isFromGlobalCode)
    92     , m_isBuiltinFunction(kind == UnlinkedBuiltinFunction)
    9392    , m_name(node->ident())
    9493    , m_inferredName(node->inferredName())
     
    168167    }
    169168
    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);
    171170   
    172171    if (error.m_type != ParserError::ErrorNone)
     
    212211    , m_isConstructor(info.m_isConstructor)
    213212    , m_hasCapturedVariables(false)
    214     , m_isBuiltinFunction(info.m_isBuiltinFunction)
    215213    , m_firstLine(0)
    216214    , m_lineCount(0)
Note: See TracChangeset for help on using the changeset viewer.