Ignore:
Timestamp:
Jul 21, 2011, 11:57:57 AM (14 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=64964
DFG JIT - Enable support for eval code

Reviewed by Sam Weinig.

This is basically the same as program code, to the JIT!

  • bytecode/Opcode.cpp:
  • bytecode/Opcode.h:
    • Enable opcodeNames in !NDEBUG builds.
  • dfg/DFGOperations.cpp:
    • Fix a bug exposed by eval support, throw correct type error for new.
  • runtime/Executable.cpp:

(JSC::EvalExecutable::compileInternal):

  • Enable DFG JIT for eval code.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r91226 r91482  
    483483   
    484484        ASSERT(callType == CallTypeNone);
    485     } else {
    486         ASSERT(kind == CodeForConstruct);
     485        exec->globalData().exception = createNotAFunctionError(exec, callee);
     486        return 0;
     487    }
     488
     489    ASSERT(kind == CodeForConstruct);
     490   
     491    ConstructData constructData;
     492    ConstructType constructType = getConstructData(callee, constructData);
     493   
     494    ASSERT(constructType != ConstructTypeJS);
     495   
     496    if (constructType == ConstructTypeHost) {
     497        if (!globalData->interpreter->registerFile().grow(execCallee->registers())) {
     498            globalData->exception = createStackOverflowError(exec);
     499            return 0;
     500        }
    487501       
    488         ConstructData constructData;
    489         ConstructType constructType = getConstructData(callee, constructData);
     502        execCallee->setScopeChain(exec->scopeChain());
    490503       
    491         ASSERT(constructType != ConstructTypeJS);
     504        globalData->hostCallReturnValue = JSValue::decode(constructData.native.function(execCallee));
    492505       
    493         if (constructType == ConstructTypeHost) {
    494             if (!globalData->interpreter->registerFile().grow(execCallee->registers())) {
    495                 globalData->exception = createStackOverflowError(exec);
    496                 return 0;
    497             }
    498            
    499             execCallee->setScopeChain(exec->scopeChain());
    500            
    501             globalData->hostCallReturnValue = JSValue::decode(constructData.native.function(execCallee));
    502            
    503             if (globalData->exception)
    504                 return 0;
    505             return reinterpret_cast<void*>(getHostCallReturnValue);
    506         }
    507        
    508         ASSERT(constructType == ConstructTypeNone);
    509     }
    510     exec->globalData().exception = createNotAFunctionError(exec, callee);
     506        if (globalData->exception)
     507            return 0;
     508        return reinterpret_cast<void*>(getHostCallReturnValue);
     509    }
     510   
     511    ASSERT(constructType == ConstructTypeNone);
     512    exec->globalData().exception = createNotAConstructorError(exec, callee);
    511513    return 0;
    512514}
Note: See TracChangeset for help on using the changeset viewer.