Changeset 38461 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
Nov 16, 2008, 5:48:55 PM (17 years ago)
Author:
[email protected]
Message:

2008-11-16 Geoffrey Garen <[email protected]>

Reviewed by Sam Weinig.

A few more renames:

BytecodeInterpreter => Interpreter
WREC => JSC::WREC, removing JSC:: prefix in a lot of places
X86Assembler::copy => X86Assembler::executableCopy
AssemblerBuffer::copy => AssemblerBuffer::executableCopy
WRECFunction => WREC::RegExpFunction
OBJECT_OFFSET => FIELD_OFFSET


Also:

Nixed use of OBJECT_OFFSET outside of CTI.cpp by making CTI a friend in more places.

Nixed X86
and X86Assembler:: prefixes in a lot of places using typedefs
  • JavaScriptCore.exp:
  • VM/CTI.cpp: (JSC::): (JSC::CTI::emitGetVirtualRegister): (JSC::CTI::emitGetVirtualRegisters): (JSC::CTI::emitPutCTIArgFromVirtualRegister): (JSC::CTI::emitPutCTIArg): (JSC::CTI::emitGetCTIArg): (JSC::CTI::emitPutCTIParam): (JSC::CTI::emitGetCTIParam): (JSC::CTI::emitPutToCallFrameHeader): (JSC::CTI::emitGetFromCallFrameHeader): (JSC::CTI::emitPutVirtualRegister): (JSC::CTI::emitNakedCall): (JSC::CTI::emitNakedFastCall): (JSC::CTI::emitCTICall): (JSC::CTI::emitJumpSlowCaseIfNotJSCell): (JSC::CTI::emitJumpSlowCaseIfNotImmNum): (JSC::CTI::emitJumpSlowCaseIfNotImmNums): (JSC::CTI::emitFastArithDeTagImmediate): (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero): (JSC::CTI::emitFastArithReTagImmediate): (JSC::CTI::emitFastArithPotentiallyReTagImmediate): (JSC::CTI::emitFastArithImmToInt): (JSC::CTI::emitFastArithIntToImmOrSlowCase): (JSC::CTI::emitFastArithIntToImmNoCheck): (JSC::CTI::emitArithIntToImmWithJump): (JSC::CTI::emitTagAsBoolImmediate): (JSC::CTI::compileOpCallInitializeCallFrame): (JSC::CTI::compileOpCall): (JSC::CTI::compileOpStrictEq): (JSC::CTI::emitSlowScriptCheck): (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate): (JSC::CTI::compileBinaryArithOp): (JSC::CTI::compileBinaryArithOpSlowCase): (JSC::CTI::privateCompileMainPass): (JSC::CTI::privateCompileSlowCases): (JSC::CTI::privateCompile): (JSC::CTI::privateCompileGetByIdSelf): (JSC::CTI::privateCompileGetByIdProto): (JSC::CTI::privateCompileGetByIdChain): (JSC::CTI::privateCompilePutByIdReplace): (JSC::CTI::privateCompilePutByIdTransition): (JSC::CTI::privateCompileCTIMachineTrampolines): (JSC::CTI::freeCTIMachineTrampolines): (JSC::CTI::patchGetByIdSelf): (JSC::CTI::patchPutByIdReplace): (JSC::CTI::privateCompilePatchGetArrayLength): (JSC::CTI::emitGetVariableObjectRegister): (JSC::CTI::emitPutVariableObjectRegister):
  • VM/CTI.h: (JSC::CallRecord::CallRecord): (JSC::JmpTable::JmpTable): (JSC::SlowCaseEntry::SlowCaseEntry): (JSC::CTI::JSRInfo::JSRInfo):
  • VM/CodeBlock.cpp: (JSC::CodeBlock::printStructures): (JSC::CodeBlock::derefStructures): (JSC::CodeBlock::refStructures):
  • VM/Machine.cpp: (JSC::jsLess): (JSC::jsLessEq): (JSC::Interpreter::resolve): (JSC::Interpreter::resolveSkip): (JSC::Interpreter::resolveGlobal): (JSC::Interpreter::resolveBase): (JSC::Interpreter::resolveBaseAndProperty): (JSC::Interpreter::resolveBaseAndFunc): (JSC::Interpreter::slideRegisterWindowForCall): (JSC::Interpreter::callEval): (JSC::Interpreter::Interpreter): (JSC::Interpreter::initialize): (JSC::Interpreter::~Interpreter): (JSC::Interpreter::dumpCallFrame): (JSC::Interpreter::dumpRegisters): (JSC::Interpreter::isOpcode): (JSC::Interpreter::unwindCallFrame): (JSC::Interpreter::throwException): (JSC::Interpreter::execute): (JSC::Interpreter::debug): (JSC::Interpreter::resetTimeoutCheck): (JSC::Interpreter::checkTimeout): (JSC::Interpreter::createExceptionScope): (JSC::Interpreter::tryCachePutByID): (JSC::Interpreter::uncachePutByID): (JSC::Interpreter::tryCacheGetByID): (JSC::Interpreter::uncacheGetByID): (JSC::Interpreter::privateExecute): (JSC::Interpreter::retrieveArguments): (JSC::Interpreter::retrieveCaller): (JSC::Interpreter::retrieveLastCaller): (JSC::Interpreter::findFunctionCallFrame): (JSC::Interpreter::tryCTICachePutByID): (JSC::Interpreter::tryCTICacheGetByID): (JSC::): (JSC::Interpreter::cti_op_convert_this): (JSC::Interpreter::cti_op_end): (JSC::Interpreter::cti_op_add): (JSC::Interpreter::cti_op_pre_inc): (JSC::Interpreter::cti_timeout_check): (JSC::Interpreter::cti_register_file_check): (JSC::Interpreter::cti_op_loop_if_less): (JSC::Interpreter::cti_op_loop_if_lesseq): (JSC::Interpreter::cti_op_new_object): (JSC::Interpreter::cti_op_put_by_id): (JSC::Interpreter::cti_op_put_by_id_second): (JSC::Interpreter::cti_op_put_by_id_generic): (JSC::Interpreter::cti_op_put_by_id_fail): (JSC::Interpreter::cti_op_get_by_id): (JSC::Interpreter::cti_op_get_by_id_second): (JSC::Interpreter::cti_op_get_by_id_generic): (JSC::Interpreter::cti_op_get_by_id_fail): (JSC::Interpreter::cti_op_instanceof): (JSC::Interpreter::cti_op_del_by_id): (JSC::Interpreter::cti_op_mul): (JSC::Interpreter::cti_op_new_func): (JSC::Interpreter::cti_op_call_JSFunction): (JSC::Interpreter::cti_op_call_arityCheck): (JSC::Interpreter::cti_vm_dontLazyLinkCall): (JSC::Interpreter::cti_vm_lazyLinkCall): (JSC::Interpreter::cti_op_push_activation): (JSC::Interpreter::cti_op_call_NotJSFunction): (JSC::Interpreter::cti_op_create_arguments): (JSC::Interpreter::cti_op_create_arguments_no_params): (JSC::Interpreter::cti_op_tear_off_activation): (JSC::Interpreter::cti_op_tear_off_arguments): (JSC::Interpreter::cti_op_profile_will_call): (JSC::Interpreter::cti_op_profile_did_call): (JSC::Interpreter::cti_op_ret_scopeChain): (JSC::Interpreter::cti_op_new_array): (JSC::Interpreter::cti_op_resolve): (JSC::Interpreter::cti_op_construct_JSConstruct): (JSC::Interpreter::cti_op_construct_NotJSConstruct): (JSC::Interpreter::cti_op_get_by_val): (JSC::Interpreter::cti_op_resolve_func): (JSC::Interpreter::cti_op_sub): (JSC::Interpreter::cti_op_put_by_val): (JSC::Interpreter::cti_op_put_by_val_array): (JSC::Interpreter::cti_op_lesseq): (JSC::Interpreter::cti_op_loop_if_true): (JSC::Interpreter::cti_op_negate): (JSC::Interpreter::cti_op_resolve_base): (JSC::Interpreter::cti_op_resolve_skip): (JSC::Interpreter::cti_op_resolve_global): (JSC::Interpreter::cti_op_div): (JSC::Interpreter::cti_op_pre_dec): (JSC::Interpreter::cti_op_jless): (JSC::Interpreter::cti_op_not): (JSC::Interpreter::cti_op_jtrue): (JSC::Interpreter::cti_op_post_inc): (JSC::Interpreter::cti_op_eq): (JSC::Interpreter::cti_op_lshift): (JSC::Interpreter::cti_op_bitand): (JSC::Interpreter::cti_op_rshift): (JSC::Interpreter::cti_op_bitnot): (JSC::Interpreter::cti_op_resolve_with_base): (JSC::Interpreter::cti_op_new_func_exp): (JSC::Interpreter::cti_op_mod): (JSC::Interpreter::cti_op_less): (JSC::Interpreter::cti_op_neq): (JSC::Interpreter::cti_op_post_dec): (JSC::Interpreter::cti_op_urshift): (JSC::Interpreter::cti_op_bitxor): (JSC::Interpreter::cti_op_new_regexp): (JSC::Interpreter::cti_op_bitor): (JSC::Interpreter::cti_op_call_eval): (JSC::Interpreter::cti_op_throw): (JSC::Interpreter::cti_op_get_pnames): (JSC::Interpreter::cti_op_next_pname): (JSC::Interpreter::cti_op_push_scope): (JSC::Interpreter::cti_op_pop_scope): (JSC::Interpreter::cti_op_typeof): (JSC::Interpreter::cti_op_is_undefined): (JSC::Interpreter::cti_op_is_boolean): (JSC::Interpreter::cti_op_is_number): (JSC::Interpreter::cti_op_is_string): (JSC::Interpreter::cti_op_is_object): (JSC::Interpreter::cti_op_is_function): (JSC::Interpreter::cti_op_stricteq): (JSC::Interpreter::cti_op_nstricteq): (JSC::Interpreter::cti_op_to_jsnumber): (JSC::Interpreter::cti_op_in): (JSC::Interpreter::cti_op_push_new_scope): (JSC::Interpreter::cti_op_jmp_scopes): (JSC::Interpreter::cti_op_put_by_index): (JSC::Interpreter::cti_op_switch_imm): (JSC::Interpreter::cti_op_switch_char): (JSC::Interpreter::cti_op_switch_string): (JSC::Interpreter::cti_op_del_by_val): (JSC::Interpreter::cti_op_put_getter): (JSC::Interpreter::cti_op_put_setter): (JSC::Interpreter::cti_op_new_error): (JSC::Interpreter::cti_op_debug): (JSC::Interpreter::cti_vm_throw):
  • VM/Machine.h:
  • VM/Register.h:
  • VM/SamplingTool.cpp: (JSC::SamplingTool::dump):
  • VM/SamplingTool.h: (JSC::SamplingTool::SamplingTool):
  • bytecompiler/CodeGenerator.cpp: (JSC::BytecodeGenerator::generate): (JSC::BytecodeGenerator::BytecodeGenerator):
  • jsc.cpp: (runWithScripts):
  • masm/X86Assembler.h: (JSC::AssemblerBuffer::executableCopy): (JSC::X86Assembler::executableCopy):
  • runtime/ExecState.h: (JSC::ExecState::interpreter):
  • runtime/JSCell.h:
  • runtime/JSFunction.h:
  • runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData):
  • runtime/JSGlobalData.h:
  • runtime/JSImmediate.h:
  • runtime/JSString.h:
  • runtime/JSValue.h:
  • runtime/JSVariableObject.h:
  • runtime/RegExp.cpp: (JSC::RegExp::RegExp): (JSC::RegExp::~RegExp): (JSC::RegExp::match):
  • runtime/RegExp.h:
  • wrec/CharacterClassConstructor.cpp:
  • wrec/CharacterClassConstructor.h:
  • wrec/WREC.cpp: (JSC::WREC::compileRegExp):
  • wrec/WREC.h: (JSC::WREC::Generator::Generator): (JSC::WREC::Parser::): (JSC::WREC::Parser::Parser): (JSC::WREC::Parser::parseAlternative):
Location:
trunk/JavaScriptCore/runtime
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/ExecState.h

    r38423 r38461  
    8383        const CommonIdentifiers& propertyNames() const { return *globalData().propertyNames; }
    8484        const ArgList& emptyList() const { return *globalData().emptyList; }
    85         BytecodeInterpreter* interpreter() { return globalData().interpreter; }
     85        Interpreter* interpreter() { return globalData().interpreter; }
    8686        Heap* heap() { return &globalData().heap; }
    8787
     
    9898        friend class JSActivation;
    9999        friend class JSGlobalObject;
    100         friend class BytecodeInterpreter;
     100        friend class Interpreter;
    101101
    102102        static CallFrame* create(Register* callFrameBase) { return static_cast<CallFrame*>(callFrameBase); }
  • trunk/JavaScriptCore/runtime/JSCell.h

    r38440 r38461  
    3939        friend class JSString;
    4040        friend class JSValue;
    41         friend class BytecodeInterpreter;
     41        friend class Interpreter;
    4242
    4343    private:
  • trunk/JavaScriptCore/runtime/JSFunction.h

    r38440 r38461  
    4040    class JSFunction : public InternalFunction {
    4141        friend class CTI;
    42         friend class BytecodeInterpreter;
     42        friend class Interpreter;
    4343
    4444        typedef InternalFunction Base;
  • trunk/JavaScriptCore/runtime/JSGlobalData.cpp

    r38440 r38461  
    6565
    6666JSGlobalData::JSGlobalData(bool isShared)
    67     : interpreter(new BytecodeInterpreter)
     67    : interpreter(new Interpreter)
    6868    , exception(noValue())
    6969    , arrayTable(new HashTable(JSC::arrayTable))
  • trunk/JavaScriptCore/runtime/JSGlobalData.h

    r38440 r38461  
    4848    class JSObject;
    4949    class Lexer;
    50     class BytecodeInterpreter;
     50    class Interpreter;
    5151    class Parser;
    5252    class ParserRefCounted;
     
    6464        ~JSGlobalData();
    6565
    66         BytecodeInterpreter* interpreter;
     66        Interpreter* interpreter;
    6767
    6868        JSValue* exception;
  • trunk/JavaScriptCore/runtime/JSImmediate.h

    r38148 r38461  
    8787    class JSImmediate {
    8888    private:
    89         friend class CTI; // Whooo!
     89        friend class CTI;
    9090   
    9191        static const uintptr_t TagMask           = 0x3u; // primary tag is 2 bits long
  • trunk/JavaScriptCore/runtime/JSString.h

    r38440 r38461  
    6161    class JSString : public JSCell {
    6262        friend class CTI;
    63         friend class BytecodeInterpreter;
     63        friend class Interpreter;
    6464
    6565    public:
  • trunk/JavaScriptCore/runtime/JSValue.h

    r38137 r38461  
    2929#include "UString.h"
    3030#include <stddef.h> // for size_t
    31 
    32 // The magic number 0x4000 is not important here, it is being subtracted back out (avoiding using zero since this
    33 // can have unexpected effects in this type of macro, particularly where multiple-inheritance is involved).
    34 #define OBJECT_OFFSET(class, member) (reinterpret_cast<ptrdiff_t>(&(reinterpret_cast<class*>(0x4000)->member)) - 0x4000)
    3531
    3632namespace JSC {
  • trunk/JavaScriptCore/runtime/JSVariableObject.h

    r38440 r38461  
    4242
    4343    class JSVariableObject : public JSObject {
     44        friend class CTI;
     45
    4446    public:
    4547        SymbolTable& symbolTable() const { return *d->symbolTable; }
     
    7375            OwnArrayPtr<Register> registerArray; // Independent copy of registers, used when a variable object copies its registers out of the register file.
    7476
    75             static inline ptrdiff_t offsetOf_registers()
    76             {
    77                 return OBJECT_OFFSET(JSVariableObjectData, registers);
    78             }
    79 
    8077        private:
    8178            JSVariableObjectData(const JSVariableObjectData&);
     
    9895
    9996        JSVariableObjectData* d;
    100 
    101     public:
    102         static inline ptrdiff_t offsetOf_d()
    103         {
    104             return OBJECT_OFFSET(JSVariableObject, d);
    105         }
    106 
    107         static inline ptrdiff_t offsetOf_Data_registers()
    108         {
    109             return JSVariableObjectData::offsetOf_registers();
    110         }
    11197    };
    11298
  • trunk/JavaScriptCore/runtime/RegExp.cpp

    r38438 r38461  
    2222#include "RegExp.h"
    2323
    24 #include "CTI.h"
    2524#include "Lexer.h"
    2625#include <pcre/pcre.h>
     
    2827#include <stdlib.h>
    2928#include <string.h>
    30 #include <wrec/WREC.h>
    3129#include <wtf/Assertions.h>
    3230#include <wtf/OwnArrayPtr.h>
     
    4644{
    4745#if ENABLE(WREC)
    48     m_wrecFunction = WREC::compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError);
     46    m_wrecFunction = compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError);
    4947    if (m_wrecFunction)
    5048        return;
     
    8987
    9088#if ENABLE(WREC)
    91     m_wrecFunction = WREC::compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));
     89    m_wrecFunction = compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));
    9290    if (m_wrecFunction)
    9391        return;
     
    110108#if ENABLE(WREC)
    111109    if (m_wrecFunction)
    112         WTF::fastFreeExecutable(m_wrecFunction);
     110        WTF::fastFreeExecutable(reinterpret_cast<void*>(m_wrecFunction));
    113111#endif
    114112}
     
    137135            ovector->set(offsetVector);
    138136
    139         int result = reinterpret_cast<WRECFunction>(m_wrecFunction)(s.data(), i, s.size(), offsetVector);
     137        int result = m_wrecFunction(s.data(), i, s.size(), offsetVector);
    140138
    141139        if (result < 0) {
  • trunk/JavaScriptCore/runtime/RegExp.h

    r38137 r38461  
    2323
    2424#include "UString.h"
     25#include "WREC.h"
    2526#include <wtf/Forward.h>
    2627#include <wtf/RefCounted.h>
     
    6768
    6869#if ENABLE(WREC)
    69         // Called as a WRECFunction
    70         void* m_wrecFunction;
     70        WREC::RegExpFunction m_wrecFunction;
    7171#endif
    7272    };
Note: See TracChangeset for help on using the changeset viewer.