Ignore:
Timestamp:
Oct 9, 2012, 12:12:56 AM (13 years ago)
Author:
[email protected]
Message:

Renamed RegisterFile to JSStack, and removed prototype of the
previously deleted Interpreter::privateExecute().
https://bugs.webkit.org/show_bug.cgi?id=98717.

Reviewed by Filip Pizlo.

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • JavaScriptCore.order:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Target.pri:
  • bytecode/BytecodeConventions.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::nameForRegister):

  • bytecode/CodeBlock.h:

(CodeBlock):

  • bytecode/ValueRecovery.h:

(JSC::ValueRecovery::alreadyInJSStack):
(JSC::ValueRecovery::alreadyInJSStackAsUnboxedInt32):
(JSC::ValueRecovery::alreadyInJSStackAsUnboxedCell):
(JSC::ValueRecovery::alreadyInJSStackAsUnboxedBoolean):
(JSC::ValueRecovery::alreadyInJSStackAsUnboxedDouble):
(JSC::ValueRecovery::displacedInJSStack):
(JSC::ValueRecovery::isAlreadyInJSStack):
(JSC::ValueRecovery::virtualRegister):
(JSC::ValueRecovery::dump):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::resolveCallee):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitConstruct):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::registerFor):

  • dfg/DFGAbstractState.h:

(AbstractState):

  • dfg/DFGAssemblyHelpers.h:

(JSC::DFG::AssemblyHelpers::emitGetFromCallFrameHeaderPtr):
(JSC::DFG::AssemblyHelpers::emitPutToCallFrameHeader):
(JSC::DFG::AssemblyHelpers::emitPutImmediateToCallFrameHeader):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::getDirect):
(JSC::DFG::ByteCodeParser::findArgumentPositionForLocal):
(JSC::DFG::ByteCodeParser::addCall):
(JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):

  • dfg/DFGGenerationInfo.h:

(GenerationInfo):
(JSC::DFG::GenerationInfo::needsSpill):

  • dfg/DFGGraph.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileEntry):
(JSC::DFG::JITCompiler::compileFunction):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::beginCall):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSRExitCompiler32_64.cpp:

(JSC::DFG::OSRExitCompiler::compileExit):

  • dfg/DFGOSRExitCompiler64.cpp:

(JSC::DFG::OSRExitCompiler::compileExit):

  • dfg/DFGRepatch.cpp:

(JSC::DFG::tryBuildGetByIDList):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):

  • dfg/DFGSpeculativeJIT.h:

(SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::spill):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::fillInteger):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGThunks.cpp:

(JSC::DFG::throwExceptionFromCallSlowPathGenerator):
(JSC::DFG::slowPathFor):
(JSC::DFG::virtualForThunkGenerator):

  • dfg/DFGValueSource.cpp:

(JSC::DFG::ValueSource::dump):

  • dfg/DFGValueSource.h:

(JSC::DFG::dataFormatToValueSourceKind):
(JSC::DFG::valueSourceKindToDataFormat):
(JSC::DFG::isInJSStack):
(JSC::DFG::ValueSource::forSpeculation):
(JSC::DFG::ValueSource::isInJSStack):
(JSC::DFG::ValueSource::valueRecovery):

  • dfg/DFGVariableEventStream.cpp:

(JSC::DFG::VariableEventStream::reconstruct):

  • heap/Heap.cpp:

(JSC::Heap::stack):
(JSC::Heap::getConservativeRegisterRoots):
(JSC::Heap::markRoots):

  • heap/Heap.h:

(JSC):
(Heap):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::stack):

  • interpreter/CallFrame.h:

(JSC::ExecState::calleeAsValue):
(JSC::ExecState::callee):
(JSC::ExecState::codeBlock):
(JSC::ExecState::scope):
(JSC::ExecState::callerFrame):
(JSC::ExecState::returnPC):
(JSC::ExecState::hasReturnPC):
(JSC::ExecState::clearReturnPC):
(JSC::ExecState::bytecodeOffsetForNonDFGCode):
(JSC::ExecState::setBytecodeOffsetForNonDFGCode):
(JSC::ExecState::inlineCallFrame):
(JSC::ExecState::codeOriginIndexForDFG):
(JSC::ExecState::currentVPC):
(JSC::ExecState::setCurrentVPC):
(JSC::ExecState::setCallerFrame):
(JSC::ExecState::setScope):
(JSC::ExecState::init):
(JSC::ExecState::argumentCountIncludingThis):
(JSC::ExecState::offsetFor):
(JSC::ExecState::setArgumentCountIncludingThis):
(JSC::ExecState::setCallee):
(JSC::ExecState::setCodeBlock):
(JSC::ExecState::setReturnPC):
(JSC::ExecState::setInlineCallFrame):
(ExecState):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::slideRegisterWindowForCall):
(JSC::eval):
(JSC::loadVarargs):
(JSC::Interpreter::dumpRegisters):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::endRepeatCall):

  • interpreter/Interpreter.h:

(JSC::Interpreter::stack):
(Interpreter):
(JSC::Interpreter::execute):
(JSC):

  • interpreter/JSStack.cpp: Copied from Source/JavaScriptCore/interpreter/RegisterFile.cpp.

(JSC::stackStatisticsMutex):
(JSC::JSStack::~JSStack):
(JSC::JSStack::growSlowCase):
(JSC::JSStack::gatherConservativeRoots):
(JSC::JSStack::releaseExcessCapacity):
(JSC::JSStack::initializeThreading):
(JSC::JSStack::committedByteCount):
(JSC::JSStack::addToCommittedByteCount):

  • interpreter/JSStack.h: Copied from Source/JavaScriptCore/interpreter/RegisterFile.h.

(JSStack):
(JSC::JSStack::JSStack):
(JSC::JSStack::shrink):
(JSC::JSStack::grow):

  • interpreter/RegisterFile.cpp: Removed.
  • interpreter/RegisterFile.h: Removed.
  • interpreter/VMInspector.cpp:

(JSC::VMInspector::dumpFrame):

  • jit/JIT.cpp:

(JSC::JIT::JIT):
(JSC::JIT::privateCompile):

  • jit/JIT.h:

(JSC):
(JIT):

  • jit/JITCall.cpp:

(JSC::JIT::compileLoadVarargs):
(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):

  • jit/JITCall32_64.cpp:

(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_ret_object_or_this):
(JSC::JIT::compileLoadVarargs):
(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):

  • jit/JITCode.h:

(JSC):
(JSC::JITCode::execute):

  • jit/JITInlineMethods.h:

(JSC::JIT::emitPutToCallFrameHeader):
(JSC::JIT::emitPutCellToCallFrameHeader):
(JSC::JIT::emitPutIntToCallFrameHeader):
(JSC::JIT::emitPutImmediateToCallFrameHeader):
(JSC::JIT::emitGetFromCallFrameHeaderPtr):
(JSC::JIT::emitGetFromCallFrameHeader32):
(JSC::JIT::updateTopCallFrame):
(JSC::JIT::unmap):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_ret_object_or_this):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_get_arguments_length):
(JSC::JIT::emit_op_get_argument_by_val):
(JSC::JIT::emit_op_resolve_global_dynamic):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_get_arguments_length):
(JSC::JIT::emit_op_get_argument_by_val):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_scoped_var):
(JSC::JIT::emit_op_put_scoped_var):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_scoped_var):
(JSC::JIT::emit_op_put_scoped_var):

  • jit/JITStubs.cpp:

(JSC::ctiTrampoline):
(JSC::JITThunks::JITThunks):
(JSC):
(JSC::DEFINE_STUB_FUNCTION):

  • jit/JITStubs.h:

(JSC):
(JITStackFrame):

  • jit/JSInterfaceJIT.h:
  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::SpecializedThunkJIT):
(JSC::SpecializedThunkJIT::returnJSValue):
(JSC::SpecializedThunkJIT::returnDouble):
(JSC::SpecializedThunkJIT::returnInt32):
(JSC::SpecializedThunkJIT::returnJSCell):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LLIntOffsetsExtractor.cpp:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::genericCall):

  • llint/LLIntSlowPaths.h:

(LLInt):

  • llint/LowLevelInterpreter.asm:
  • runtime/Arguments.cpp:

(JSC::Arguments::tearOffForInlineCallFrame):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::arityCheckFor):

  • runtime/InitializeThreading.cpp:

(JSC::initializeThreadingOnce):

  • runtime/JSActivation.cpp:

(JSC::JSActivation::visitChildren):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::globalExec):

  • runtime/JSGlobalObject.h:

(JSC):
(JSGlobalObject):

  • runtime/JSLock.cpp:

(JSC):

  • runtime/JSVariableObject.h:

(JSVariableObject):

  • runtime/MemoryStatistics.cpp:

(JSC::globalMemoryStatistics):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/interpreter/CallFrame.h

    r129827 r130726  
    2626#include "AbstractPC.h"
    2727#include "JSGlobalData.h"
     28#include "JSStack.h"
    2829#include "MacroAssemblerCodeRef.h"
    29 #include "RegisterFile.h"
    3030
    3131namespace JSC  {
     
    4040    class ExecState : private Register {
    4141    public:
    42         JSValue calleeAsValue() const { return this[RegisterFile::Callee].jsValue(); }
    43         JSObject* callee() const { return this[RegisterFile::Callee].function(); }
    44         CodeBlock* codeBlock() const { return this[RegisterFile::CodeBlock].Register::codeBlock(); }
     42        JSValue calleeAsValue() const { return this[JSStack::Callee].jsValue(); }
     43        JSObject* callee() const { return this[JSStack::Callee].function(); }
     44        CodeBlock* codeBlock() const { return this[JSStack::CodeBlock].Register::codeBlock(); }
    4545        JSScope* scope() const
    4646        {
    47             ASSERT(this[RegisterFile::ScopeChain].Register::scope());
    48             return this[RegisterFile::ScopeChain].Register::scope();
     47            ASSERT(this[JSStack::ScopeChain].Register::scope());
     48            return this[JSStack::ScopeChain].Register::scope();
    4949        }
    5050
     
    103103        CallFrame& operator=(const Register& r) { *static_cast<Register*>(this) = r; return *this; }
    104104
    105         CallFrame* callerFrame() const { return this[RegisterFile::CallerFrame].callFrame(); }
     105        CallFrame* callerFrame() const { return this[JSStack::CallerFrame].callFrame(); }
    106106#if ENABLE(JIT) || ENABLE(LLINT)
    107         ReturnAddressPtr returnPC() const { return ReturnAddressPtr(this[RegisterFile::ReturnPC].vPC()); }
    108         bool hasReturnPC() const { return !!this[RegisterFile::ReturnPC].vPC(); }
    109         void clearReturnPC() { registers()[RegisterFile::ReturnPC] = static_cast<Instruction*>(0); }
     107        ReturnAddressPtr returnPC() const { return ReturnAddressPtr(this[JSStack::ReturnPC].vPC()); }
     108        bool hasReturnPC() const { return !!this[JSStack::ReturnPC].vPC(); }
     109        void clearReturnPC() { registers()[JSStack::ReturnPC] = static_cast<Instruction*>(0); }
    110110#endif
    111111        AbstractPC abstractReturnPC(JSGlobalData& globalData) { return AbstractPC(globalData, this); }
     
    117117        {
    118118            ASSERT(codeBlock());
    119             return this[RegisterFile::ArgumentCount].tag();
     119            return this[JSStack::ArgumentCount].tag();
    120120        }
    121121       
     
    123123        {
    124124            ASSERT(codeBlock());
    125             this[RegisterFile::ArgumentCount].tag() = static_cast<int32_t>(offset);
     125            this[JSStack::ArgumentCount].tag() = static_cast<int32_t>(offset);
    126126        }
    127127#endif
     
    137137   
    138138#if ENABLE(DFG_JIT)
    139         InlineCallFrame* inlineCallFrame() const { return this[RegisterFile::ReturnPC].asInlineCallFrame(); }
    140         unsigned codeOriginIndexForDFG() const { return this[RegisterFile::ArgumentCount].tag(); }
     139        InlineCallFrame* inlineCallFrame() const { return this[JSStack::ReturnPC].asInlineCallFrame(); }
     140        unsigned codeOriginIndexForDFG() const { return this[JSStack::ArgumentCount].tag(); }
    141141#else
    142142        // This will never be called if !ENABLE(DFG_JIT) since all calls should be guarded by
     
    152152        Instruction* currentVPC() const
    153153        {
    154             return bitwise_cast<Instruction*>(this[RegisterFile::ArgumentCount].tag());
     154            return bitwise_cast<Instruction*>(this[JSStack::ArgumentCount].tag());
    155155        }
    156156        void setCurrentVPC(Instruction* vpc)
    157157        {
    158             this[RegisterFile::ArgumentCount].tag() = bitwise_cast<int32_t>(vpc);
     158            this[JSStack::ArgumentCount].tag() = bitwise_cast<int32_t>(vpc);
    159159        }
    160160#else
     
    163163#endif
    164164
    165         void setCallerFrame(CallFrame* callerFrame) { static_cast<Register*>(this)[RegisterFile::CallerFrame] = callerFrame; }
    166         void setScope(JSScope* scope) { static_cast<Register*>(this)[RegisterFile::ScopeChain] = scope; }
     165        void setCallerFrame(CallFrame* callerFrame) { static_cast<Register*>(this)[JSStack::CallerFrame] = callerFrame; }
     166        void setScope(JSScope* scope) { static_cast<Register*>(this)[JSStack::ScopeChain] = scope; }
    167167
    168168        ALWAYS_INLINE void init(CodeBlock* codeBlock, Instruction* vPC, JSScope* scope,
     
    170170        {
    171171            ASSERT(callerFrame); // Use noCaller() rather than 0 for the outer host call frame caller.
    172             ASSERT(callerFrame == noCaller() || callerFrame->removeHostCallFrameFlag()->registerFile()->end() >= this);
     172            ASSERT(callerFrame == noCaller() || callerFrame->removeHostCallFrameFlag()->stack()->end() >= this);
    173173
    174174            setCodeBlock(codeBlock);
     
    187187        // Access to arguments as passed. (After capture, arguments may move to a different location.)
    188188        size_t argumentCount() const { return argumentCountIncludingThis() - 1; }
    189         size_t argumentCountIncludingThis() const { return this[RegisterFile::ArgumentCount].payload(); }
     189        size_t argumentCountIncludingThis() const { return this[JSStack::ArgumentCount].payload(); }
    190190        static int argumentOffset(int argument) { return s_firstArgumentOffset - argument; }
    191191        static int argumentOffsetIncludingThis(int argument) { return s_thisArgumentOffset - argument; }
     
    217217        JSValue argumentAfterCapture(size_t argument);
    218218
    219         static int offsetFor(size_t argumentCountIncludingThis) { return argumentCountIncludingThis + RegisterFile::CallFrameHeaderSize; }
     219        static int offsetFor(size_t argumentCountIncludingThis) { return argumentCountIncludingThis + JSStack::CallFrameHeaderSize; }
    220220
    221221        // FIXME: Remove these.
     
    229229        CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); }
    230230
    231         void setArgumentCountIncludingThis(int count) { static_cast<Register*>(this)[RegisterFile::ArgumentCount].payload() = count; }
    232         void setCallee(JSObject* callee) { static_cast<Register*>(this)[RegisterFile::Callee] = Register::withCallee(callee); }
    233         void setCodeBlock(CodeBlock* codeBlock) { static_cast<Register*>(this)[RegisterFile::CodeBlock] = codeBlock; }
    234         void setReturnPC(void* value) { static_cast<Register*>(this)[RegisterFile::ReturnPC] = (Instruction*)value; }
     231        void setArgumentCountIncludingThis(int count) { static_cast<Register*>(this)[JSStack::ArgumentCount].payload() = count; }
     232        void setCallee(JSObject* callee) { static_cast<Register*>(this)[JSStack::Callee] = Register::withCallee(callee); }
     233        void setCodeBlock(CodeBlock* codeBlock) { static_cast<Register*>(this)[JSStack::CodeBlock] = codeBlock; }
     234        void setReturnPC(void* value) { static_cast<Register*>(this)[JSStack::ReturnPC] = (Instruction*)value; }
    235235       
    236236#if ENABLE(DFG_JIT)
    237237        bool isInlineCallFrame();
    238238       
    239         void setInlineCallFrame(InlineCallFrame* inlineCallFrame) { static_cast<Register*>(this)[RegisterFile::ReturnPC] = inlineCallFrame; }
     239        void setInlineCallFrame(InlineCallFrame* inlineCallFrame) { static_cast<Register*>(this)[JSStack::ReturnPC] = inlineCallFrame; }
    240240       
    241241        // Call this to get the semantically correct JS CallFrame* for the
     
    270270    private:
    271271        static const intptr_t HostCallFrameFlag = 1;
    272         static const int s_thisArgumentOffset = -1 - RegisterFile::CallFrameHeaderSize;
     272        static const int s_thisArgumentOffset = -1 - JSStack::CallFrameHeaderSize;
    273273        static const int s_firstArgumentOffset = s_thisArgumentOffset - 1;
    274274
    275275#ifndef NDEBUG
    276         RegisterFile* registerFile();
     276        JSStack* stack();
    277277#endif
    278278#if ENABLE(DFG_JIT)
Note: See TracChangeset for help on using the changeset viewer.