Ignore:
Timestamp:
Apr 7, 2014, 8:55:12 PM (11 years ago)
Author:
[email protected]
Message:

Setters are just getters that take an extra argument and don't return a value
https://bugs.webkit.org/show_bug.cgi?id=131336

Reviewed by Geoffrey Garen.

Other than that, they're totally the same thing.

This isn't as dumb as it sounds.

Most of the work in calling an accessor has to do with emitting the necessary checks for
figuring out whether we're calling the accessor we expected, followed by the boilerplate
needed for setting up a call inside of a stub. It makes sense for the code to be totally
common.

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::storeValue):
(JSC::AssemblyHelpers::moveTrustedValue):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::setupResults):

  • jit/Repatch.cpp:

(JSC::kindFor):
(JSC::customFor):
(JSC::generateByIdStub):
(JSC::tryCacheGetByID):
(JSC::tryBuildGetByIDList):
(JSC::tryCachePutByID):
(JSC::tryBuildPutByIdList):
(JSC::generateGetByIdStub): Deleted.
(JSC::emitCustomSetterStub): Deleted.

  • runtime/JSCJSValue.h:

(JSC::JSValue::asValue):

  • runtime/PutPropertySlot.h:

(JSC::PutPropertySlot::cachedOffset):

File:
1 edited

Legend:

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

    r166263 r166908  
    7878#endif
    7979    }
     80   
     81    void storeValue(JSValueRegs regs, Address address)
     82    {
     83#if USE(JSVALUE64)
     84        store64(regs.gpr(), address);
     85#else
     86        store32(regs.payloadGPR(), address.withOffset(PayloadOffset));
     87        store32(regs.tagGPR(), address.withOffset(TagOffset));
     88#endif
     89    }
     90   
     91    void moveTrustedValue(JSValue value, JSValueRegs regs)
     92    {
     93#if USE(JSVALUE64)
     94        move(TrustedImm64(JSValue::encode(value)), regs.gpr());
     95#else
     96        move(TrustedImm32(value.tag()), regs.tagGPR());
     97        move(TrustedImm32(value.payload()), regs.payloadGPR());
     98#endif
     99    }
    80100
    81101#if CPU(X86_64) || CPU(X86)
Note: See TracChangeset for help on using the changeset viewer.