Changeset 37406 in webkit for trunk/JavaScriptCore/VM/CTI.h


Ignore:
Timestamp:
Oct 7, 2008, 9:56:38 PM (17 years ago)
Author:
[email protected]
Message:

Switch CTI runtime calls to the fastcall calling convention

Reviewed by Cameron Zwarich

Basically this means that we get to store the argument for CTI
calls in the ECX register, which saves a register->memory write
and subsequent memory->register read.

This is a 1.7% progression in SunSpider and 2.4% on commandline
v8 tests on Windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CTI.h

    r37386 r37406  
    108108    struct VoidPtrPair { void* first; void* second; };
    109109
    110     typedef JSValue* (*CTIHelper_j)(CTI_ARGS);
    111     typedef JSPropertyNameIterator* (*CTIHelper_p)(CTI_ARGS);
    112     typedef void (*CTIHelper_v)(CTI_ARGS);
    113     typedef void* (*CTIHelper_s)(CTI_ARGS);
    114     typedef int (*CTIHelper_b)(CTI_ARGS);
    115     typedef VoidPtrPair (*CTIHelper_2)(CTI_ARGS);
     110#if COMPILER(MSVC)
     111
     112#if USE(FAST_CALL_CTI_ARGUMENT)
     113#define SFX_CALL __fastcall
     114#else
     115#define SFX_CALL __cdecl
     116#endif
     117
     118#else
     119#define SFX_CALL
     120#endif
     121
     122    typedef JSValue* (SFX_CALL *CTIHelper_j)(CTI_ARGS);
     123    typedef JSPropertyNameIterator* (SFX_CALL *CTIHelper_p)(CTI_ARGS);
     124    typedef void (SFX_CALL *CTIHelper_v)(CTI_ARGS);
     125    typedef void* (SFX_CALL *CTIHelper_s)(CTI_ARGS);
     126    typedef int (SFX_CALL *CTIHelper_b)(CTI_ARGS);
     127    typedef VoidPtrPair (SFX_CALL *CTIHelper_2)(CTI_ARGS);
    116128
    117129    struct CallRecord {
     
    251263        static const int repatchGetByIdDefaultOffset = 256;
    252264
    253 #if USE(CTI_ARGUMENT)
     265#if USE(FAST_CALL_CTI_ARGUMENT)
     266        static const int ctiArgumentInitSize = 2;
     267#elif USE(CTI_ARGUMENT)
    254268        static const int ctiArgumentInitSize = 4;
    255269#else
Note: See TracChangeset for help on using the changeset viewer.