Ignore:
Timestamp:
Aug 31, 2012, 4:25:28 PM (13 years ago)
Author:
[email protected]
Message:

Refactor LLInt and supporting code in preparation for the C Loop backend.
https://bugs.webkit.org/show_bug.cgi?id=95531.

Patch by Mark Lam <[email protected]> on 2012-08-31
Reviewed by Filip Pizlo.

  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFromLLInt):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFromLLInt):

  • jit/JITExceptions.cpp:

(JSC::genericThrow): Use ExecutableBase::catchRoutineFor() to fetch

fetch the catch routine for a thrown exception. This will allow
us to redefine that for the C loop later, and still keep this
code readable.

  • llint/LLIntOfflineAsmConfig.h: Moved ASM macros to

LowLevelInterpreter.cpp which is the only place they are used. This
will make it more convenient to redefine them for the C loop later.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall): Use ExecutableBase's hostCodeEntry()

jsCodeEntryFor(), and jsCodeWithArityCheckEntryFor() for computing
the entry points to functions being called.

  • llint/LLIntSlowPaths.h:

(SlowPathReturnType):
(JSC::LLInt::encodeResult):
(LLInt):
(JSC::LLInt::decodeResult): Added. Needed by LLInt C Loop later.

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter.cpp:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/asm.rb: Disambiguate between opcodes and other labels.
  • offlineasm/config.rb:
  • runtime/Executable.h:

(JSC::ExecutableBase::hostCodeEntryFor): Added.
(ExecutableBase):
(JSC::ExecutableBase::jsCodeEntryFor): Added.
(JSC::ExecutableBase::jsCodeWithArityCheckEntryFor): Added.
(JSC::ExecutableBase::catchRoutineFor): Added.

  • runtime/JSValueInlineMethods.h:

(JSC):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h

    r120244 r127333  
    4545struct SlowPathReturnType {
    4646    void* a;
    47     void* b;
     47    ExecState* b;
    4848};
    4949
    50 inline SlowPathReturnType encodeResult(void* a, void* b)
     50inline SlowPathReturnType encodeResult(void* a, ExecState* b)
    5151{
    5252    SlowPathReturnType result;
     
    5555    return result;
    5656}
    57 #else
     57
     58inline void decodeResult(SlowPathReturnType result, void*& a, ExecState*& b)
     59{
     60    a = result.a;
     61    b = result.b;
     62}
     63
     64#else // USE(JSVALUE32_64)
    5865typedef int64_t SlowPathReturnType;
    5966
    60 inline SlowPathReturnType encodeResult(void* a, void* b)
    61 {
    62     union {
    63         struct {
    64             void* a;
    65             void* b;
    66         } pair;
    67         int64_t i;
    68     } u;
     67typedef union {
     68    struct {
     69        void* a;
     70        ExecState* b;
     71    } pair;
     72    int64_t i;
     73} SlowPathReturnTypeEncoding;
     74
     75inline SlowPathReturnType encodeResult(void* a, ExecState* b)
     76{
     77    SlowPathReturnTypeEncoding u;
    6978    u.pair.a = a;
    7079    u.pair.b = b;
    7180    return u.i;
    7281}
    73 #endif
     82
     83inline void decodeResult(SlowPathReturnType result, void*& a, ExecState*& b)
     84{
     85    SlowPathReturnTypeEncoding u;
     86    u.i = result;
     87    a = u.pair.a;
     88    b = u.pair.b;
     89}
     90#endif // USE(JSVALUE32_64)
    7491
    7592extern "C" SlowPathReturnType llint_trace_operand(ExecState*, Instruction*, int fromWhere, int operand);
Note: See TracChangeset for help on using the changeset viewer.