Ignore:
Timestamp:
Feb 23, 2009, 7:58:09 PM (16 years ago)
Author:
[email protected]
Message:

2009-02-23 Geoffrey Garen <[email protected]>

Reviewed by Sam Weinig.

Next step in splitting JIT functionality out of the Interpreter class:
Moved vptr storage from Interpreter to JSGlobalData, so it could be shared
between Interpreter and JITStubs, and moved the *Trampoline JIT stubs
into the JITStubs class. Also added a VPtrSet class to encapsulate vptr
hacks during JSGlobalData initialization.


SunSpider says 0.4% faster. Meh.

  • JavaScriptCore.exp:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • interpreter/Interpreter.cpp: (JSC::Interpreter::Interpreter): (JSC::Interpreter::tryCacheGetByID): (JSC::Interpreter::privateExecute):
  • interpreter/Interpreter.h:
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompile): (JSC::JIT::privateCompileCTIMachineTrampolines):
  • jit/JIT.h: (JSC::JIT::compileCTIMachineTrampolines):
  • jit/JITCall.cpp: (JSC::JIT::compileOpCall): (JSC::JIT::compileOpCallSlowCase):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::privateCompilePatchGetArrayLength):
  • jit/JITStubs.cpp: (JSC::JITStubs::JITStubs): (JSC::JITStubs::tryCacheGetByID): (JSC::JITStubs::cti_vm_dontLazyLinkCall): (JSC::JITStubs::cti_op_get_by_val): (JSC::JITStubs::cti_op_get_by_val_byte_array): (JSC::JITStubs::cti_op_put_by_val): (JSC::JITStubs::cti_op_put_by_val_array): (JSC::JITStubs::cti_op_put_by_val_byte_array): (JSC::JITStubs::cti_op_is_string):
  • jit/JITStubs.h: (JSC::JITStubs::ctiArrayLengthTrampoline): (JSC::JITStubs::ctiStringLengthTrampoline): (JSC::JITStubs::ctiVirtualCallPreLink): (JSC::JITStubs::ctiVirtualCallLink): (JSC::JITStubs::ctiVirtualCall):
  • runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncPop): (JSC::arrayProtoFuncPush):
  • runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncApply):
  • runtime/JSArray.h: (JSC::isJSArray):
  • runtime/JSByteArray.h: (JSC::asByteArray): (JSC::isJSByteArray):
  • runtime/JSCell.h:
  • runtime/JSFunction.h:
  • runtime/JSGlobalData.cpp: (JSC::VPtrSet::VPtrSet): (JSC::JSGlobalData::JSGlobalData): (JSC::JSGlobalData::create): (JSC::JSGlobalData::sharedInstance):
  • runtime/JSGlobalData.h:
  • runtime/JSString.h: (JSC::isJSString):
  • runtime/Operations.h: (JSC::jsLess): (JSC::jsLessEq):
  • wrec/WREC.cpp: (JSC::WREC::Generator::compileRegExp):
File:
1 edited

Legend:

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

    r41126 r41168  
    6868        friend class JIT;
    6969        friend class JITStubs;
     70
    7071    public:
    7172        Interpreter();
    72         ~Interpreter();
    7373
    74         void initialize(JSGlobalData*);
    75        
    7674        RegisterFile& registerFile() { return m_registerFile; }
    7775       
     
    109107        void setSampler(SamplingTool* sampler) { m_sampler = sampler; }
    110108        SamplingTool* sampler() { return m_sampler; }
    111 
    112         bool isJSArray(JSValuePtr v) { return v.isCell() && v.asCell()->vptr() == m_jsArrayVptr; }
    113         bool isJSString(JSValuePtr v) { return v.isCell() && v.asCell()->vptr() == m_jsStringVptr; }
    114         bool isJSByteArray(JSValuePtr v) { return v.isCell() && v.asCell()->vptr() == m_jsByteArrayVptr; }
    115109
    116110    private:
     
    151145        SamplingTool* m_sampler;
    152146
    153 #if ENABLE(JIT)
    154         RefPtr<ExecutablePool> m_executablePool;
    155         void* m_ctiArrayLengthTrampoline;
    156         void* m_ctiStringLengthTrampoline;
    157         void* m_ctiVirtualCallPreLink;
    158         void* m_ctiVirtualCallLink;
    159         void* m_ctiVirtualCall;
    160 #endif
    161 
    162147        int m_reentryDepth;
    163148
    164149        RegisterFile m_registerFile;
    165150       
    166         void* m_jsArrayVptr;
    167         void* m_jsByteArrayVptr;
    168         void* m_jsStringVptr;
    169         void* m_jsFunctionVptr;
    170 
    171151#if HAVE(COMPUTED_GOTO)
    172152        Opcode m_opcodeTable[numOpcodeIDs]; // Maps OpcodeID => Opcode for compiling
Note: See TracChangeset for help on using the changeset viewer.