Ignore:
Timestamp:
Mar 14, 2011, 11:16:36 AM (14 years ago)
Author:
[email protected]
Message:

2011-03-11 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

Ensure all values are correctly tagged in the registerfile
https://bugs.webkit.org/show_bug.cgi?id=56214

This patch makes sure that all JSCell pointers written to
the registerfile are correctly tagged as JSCells, and replaces
raw int usage with the immediate representation.

For performance, register pressure, and general saneness reasons
I've added abstractions for reading and writing the tag
and payload of integer registers directly for the JSVALUE64
encoding.

  • interpreter/Register.h: (JSC::Register::withInt): (JSC::Register::withCallee): (JSC::Register::operator=): (JSC::Register::i): (JSC::Register::activation): (JSC::Register::function): (JSC::Register::propertyNameIterator): (JSC::Register::scopeChain):
  • jit/JIT.h:
  • jit/JITCall.cpp: (JSC::JIT::compileOpCallInitializeCallFrame): (JSC::JIT::compileOpCallVarargs): (JSC::JIT::compileOpCall):
  • jit/JITCall32_64.cpp: (JSC::JIT::compileOpCallInitializeCallFrame): (JSC::JIT::compileOpCallVarargs): (JSC::JIT::compileOpCall): (JSC::JIT::compileOpCallSlowCase):
  • jit/JITInlineMethods.h: (JSC::JIT::emitPutToCallFrameHeader): (JSC::JIT::emitPutCellToCallFrameHeader): (JSC::JIT::emitPutIntToCallFrameHeader):
  • jit/JITOpcodes.cpp: (JSC::JIT::privateCompileCTINativeCall): (JSC::JIT::emit_op_get_pnames): (JSC::JIT::emit_op_next_pname): (JSC::JIT::emit_op_load_varargs): (JSC::JIT::emitSlow_op_load_varargs):
  • jit/JITOpcodes32_64.cpp: (JSC::JIT::privateCompileCTINativeCall): (JSC::JIT::emit_op_get_pnames): (JSC::JIT::emit_op_next_pname):
  • jit/JSInterfaceJIT.h: (JSC::JSInterfaceJIT::intPayloadFor): (JSC::JSInterfaceJIT::intTagFor):
  • jit/SpecializedThunkJIT.h: (JSC::SpecializedThunkJIT::returnJSValue): (JSC::SpecializedThunkJIT::returnDouble): (JSC::SpecializedThunkJIT::returnInt32): (JSC::SpecializedThunkJIT::returnJSCell):

2011-03-11 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

Ensure all values are correctly tagged in the registerfile
https://bugs.webkit.org/show_bug.cgi?id=56214

Make sure everything builds still.

  • bridge/c/c_class.cpp:
  • bridge/c/c_runtime.cpp:
  • bridge/jni/JavaMethod.cpp:
  • plugins/PluginViewNone.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/SpecializedThunkJIT.h

    r80938 r81040  
    8888            if (src != regT0)
    8989                move(src, regT0);
    90             loadPtr(Address(callFrameRegister, RegisterFile::CallerFrame * (int)sizeof(Register)), callFrameRegister);
     90            loadPtr(payloadFor(RegisterFile::CallerFrame, callFrameRegister), callFrameRegister);
    9191            ret();
    9292        }
     
    102102            loadPtr(Address(stackPointerRegister, OBJECT_OFFSETOF(JSValue, u.asBits.payload) - sizeof(double)), regT0);
    103103#endif
    104             loadPtr(Address(callFrameRegister, RegisterFile::CallerFrame * (int)sizeof(Register)), callFrameRegister);
     104            loadPtr(payloadFor(RegisterFile::CallerFrame, callFrameRegister), callFrameRegister);
    105105            ret();
    106106        }
     
    111111                move(src, regT0);
    112112            tagReturnAsInt32();
    113             loadPtr(Address(callFrameRegister, RegisterFile::CallerFrame * (int)sizeof(Register)), callFrameRegister);
     113            loadPtr(payloadFor(RegisterFile::CallerFrame, callFrameRegister), callFrameRegister);
    114114            ret();
    115115        }
     
    120120                move(src, regT0);
    121121            tagReturnAsJSCell();
    122             loadPtr(Address(callFrameRegister, RegisterFile::CallerFrame * (int)sizeof(Register)), callFrameRegister);
     122            loadPtr(payloadFor(RegisterFile::CallerFrame, callFrameRegister), callFrameRegister);
    123123            ret();
    124124        }
Note: See TracChangeset for help on using the changeset viewer.