Changeset 60105 in webkit for trunk/JavaScriptCore/interpreter


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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/Interpreter.cpp

    r60084 r60105  
    38843884        vPC = callFrame->returnPC();
    38853885        callFrame = callFrame->callerFrame();
    3886 
     3886       
    38873887        if (callFrame->hasHostCallFrameFlag())
    38883888            return returnValue;
     
    39293929
    39303930        vPC += OPCODE_LENGTH(op_enter_with_activation);
    3931         NEXT_INSTRUCTION();
    3932     }
    3933     DEFINE_OPCODE(op_get_callee) {
    3934         /* op_get_callee callee(r)
    3935 
    3936            Move callee into a register.
    3937         */
    3938 
    3939         callFrame->r(vPC[1].u.operand) = callFrame->callee();
    3940 
    3941         vPC += OPCODE_LENGTH(op_get_callee);
    3942         NEXT_INSTRUCTION();
    3943     }
    3944     DEFINE_OPCODE(op_create_this) {
    3945         /* op_create_this this(r) proto(r)
    3946 
    3947            Allocate an object as 'this', fr use in construction.
    3948 
    3949            This opcode should only be used at the beginning of a code
    3950            block.
    3951         */
    3952 
    3953         int thisRegister = vPC[1].u.operand;
    3954         int protoRegister = vPC[2].u.operand;
    3955 
    3956         JSFunction* constructor = asFunction(callFrame->callee());
    3957 #if !ASSERT_DISABLED
    3958         ConstructData constructData;
    3959         ASSERT(constructor->getConstructData(constructData) == ConstructTypeJS);
    3960 #endif
    3961 
    3962         Structure* structure;
    3963         JSValue proto = callFrame->r(protoRegister).jsValue();
    3964         if (proto.isObject())
    3965             structure = asObject(proto)->inheritorID();
    3966         else
    3967             structure = constructor->scope().node()->globalObject->emptyObjectStructure();
    3968         callFrame->r(thisRegister) = new (&callFrame->globalData()) JSObject(structure);
    3969 
    3970         vPC += OPCODE_LENGTH(op_create_this);
    39713931        NEXT_INSTRUCTION();
    39723932    }
     
    40414001        int argCount = vPC[2].u.operand;
    40424002        int registerOffset = vPC[3].u.operand;
     4003        int proto = vPC[4].u.operand;
     4004        int thisRegister = vPC[5].u.operand;
    40434005
    40444006        JSValue v = callFrame->r(func).jsValue();
     
    40504012            ScopeChainNode* callDataScopeChain = constructData.js.scopeChain;
    40514013            CodeBlock* newCodeBlock = &constructData.js.functionExecutable->bytecodeForConstruct(callFrame, callDataScopeChain);
     4014
     4015            Structure* structure;
     4016            JSValue prototype = callFrame->r(proto).jsValue();
     4017            if (prototype.isObject())
     4018                structure = asObject(prototype)->inheritorID();
     4019            else
     4020                structure = callDataScopeChain->globalObject->emptyObjectStructure();
     4021            JSObject* newObject = new (globalData) JSObject(structure);
     4022
     4023            callFrame->r(thisRegister) = JSValue(newObject); // "this" value
    40524024
    40534025            CallFrame* previousCallFrame = callFrame;
     
    40724044
    40734045        if (constructType == ConstructTypeHost) {
     4046            ArgList args(callFrame->registers() + thisRegister + 1, argCount - 1);
     4047
    40744048            ScopeChainNode* scopeChain = callFrame->scopeChain();
    40754049            CallFrame* newCallFrame = CallFrame::create(callFrame->registers() + registerOffset);
    40764050            newCallFrame->init(0, vPC + OPCODE_LENGTH(op_construct), scopeChain, callFrame, 0, argCount, 0);
    4077 
    4078             Register* thisRegister = newCallFrame->registers() - RegisterFile::CallFrameHeaderSize - argCount;
    4079             ArgList args(thisRegister + 1, argCount - 1);
    40804051
    40814052            JSValue returnValue;
Note: See TracChangeset for help on using the changeset viewer.