Changeset 60105 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
May 24, 2010, 5:44:17 PM (15 years ago)
Author:
[email protected]
Message:

Reverting 60075 & 60084, these broke the interpreter.

Reviewed by NOBODY (revert).

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dump):
(JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):

  • bytecode/CodeBlock.h:
  • bytecode/Opcode.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitConstruct):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitGetByIdExceptionInfo):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::privateExecute):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITCall.cpp:

(JSC::JIT::compileOpConstructSetupArgs):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileOpConstructSetupArgs):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_convert_this):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):
(JSC::JITThunks::hostFunctionStub):

  • jit/JITStubs.h:

(JSC::JITThunks::ctiNativeCall):
(JSC::):

  • runtime/ExceptionHelpers.cpp:

(JSC::createNotAnObjectError):

  • runtime/Executable.h:

(JSC::NativeExecutable::create):
(JSC::NativeExecutable::NativeExecutable):

  • runtime/JSFunction.cpp:
  • runtime/JSFunction.h:
Location:
trunk/JavaScriptCore/runtime
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/ExceptionHelpers.cpp

    r60075 r60105  
    183183JSObject* createNotAnObjectError(ExecState* exec, JSNotAnObjectErrorStub* error, unsigned bytecodeOffset, CodeBlock* codeBlock)
    184184{
    185     // Both op_create_this and op_instanceof require a use of op_get_by_id to get
     185    // Both op_construct and op_instanceof require a use of op_get_by_id to get
    186186    // the prototype property from an object. The exception messages for exceptions
    187187    // thrown by these instances op_get_by_id need to reflect this.
    188188    OpcodeID followingOpcodeID;
    189189    if (codeBlock->getByIdExceptionInfoForBytecodeOffset(exec, bytecodeOffset, followingOpcodeID)) {
    190         ASSERT(followingOpcodeID == op_create_this || followingOpcodeID == op_instanceof);
    191         if (followingOpcodeID == op_create_this)
     190        ASSERT(followingOpcodeID == op_construct || followingOpcodeID == op_instanceof);
     191        if (followingOpcodeID == op_construct)
    192192            return createNotAConstructorError(exec, error->isNull() ? jsNull() : jsUndefined(), bytecodeOffset, codeBlock);
    193193        return createInvalidParamError(exec, "instanceof", error->isNull() ? jsNull() : jsUndefined(), bytecodeOffset, codeBlock);
  • trunk/JavaScriptCore/runtime/Executable.h

    r60075 r60105  
    9494        friend class JIT;
    9595    public:
    96         static PassRefPtr<NativeExecutable> create(MacroAssemblerCodePtr callThunk, NativeFunction function, MacroAssemblerCodePtr constructThunk, NativeFunction constructor)
    97         {
    98             return adoptRef(new NativeExecutable(JITCode::HostFunction(callThunk), function, JITCode::HostFunction(constructThunk), constructor));
     96        static PassRefPtr<NativeExecutable> create(MacroAssemblerCodePtr thunk, NativeFunction function)
     97        {
     98            return adoptRef(new NativeExecutable(JITCode::HostFunction(thunk), function));
    9999        }
    100100
     
    104104
    105105    private:
    106         NativeExecutable(JITCode callThunk, NativeFunction function, JITCode constructThunk, NativeFunction constructor)
     106        NativeExecutable(JITCode thunk, NativeFunction function)
    107107            : ExecutableBase(NUM_PARAMETERS_IS_HOST)
    108108            , m_function(function)
    109             , m_constructor(constructor)
    110         {
    111             m_jitCodeForCall = callThunk;
    112             m_jitCodeForConstruct = constructThunk;
     109        {
     110            m_jitCodeForCall = thunk;
     111            m_jitCodeForConstruct = thunk;
    113112        }
    114113
    115114        NativeFunction m_function;
    116         // Probably should be a NativeConstructor, but this will currently require rewriting the JIT
    117         // trampoline. It may be easier to make NativeFunction be passed 'this' as a part of the ArgList.
    118         NativeFunction m_constructor;
    119115    };
    120116#endif
  • trunk/JavaScriptCore/runtime/JSFunction.cpp

    r60075 r60105  
    2929#include "CommonIdentifiers.h"
    3030#include "CallFrame.h"
    31 #include "ExceptionHelpers.h"
    3231#include "FunctionPrototype.h"
    3332#include "JSGlobalObject.h"
     
    4241
    4342namespace JSC {
    44 
    45 JSValue JSC_HOST_CALL callHostFunctionAsConstructor(ExecState* exec, JSObject* constructor, JSValue, const ArgList&)
    46 {
    47     CodeBlock* codeBlock = exec->callerFrame()->codeBlock();
    48     unsigned vPCIndex = codeBlock->bytecodeOffset(exec, exec->returnPC());
    49     exec->setException(createNotAConstructorError(exec, constructor, vPCIndex, codeBlock));
    50     return JSValue();
    51 }
    5243
    5344ASSERT_CLASS_FITS_IN_CELL(JSFunction);
  • trunk/JavaScriptCore/runtime/JSFunction.h

    r60075 r60105  
    3535    class JSGlobalObject;
    3636    class NativeExecutable;
    37 
    38     JSValue JSC_HOST_CALL callHostFunctionAsConstructor(ExecState*, JSObject*, JSValue, const ArgList&);
    3937
    4038    class JSFunction : public JSObjectWithGlobalObject {
Note: See TracChangeset for help on using the changeset viewer.