Changeset 96175 in webkit


Ignore:
Timestamp:
Sep 27, 2011 6:09:33 PM (13 years ago)
Author:
barraclough@apple.com
Message:

Get JSVALUE32_64 DFG JIT building on OS X.
https://bugs.webkit.org/show_bug.cgi?id=68961

Reviewed by Geoff Garen.

  • Merge bug #68763 (DFG JIT should not eagerly initialize integer tags in the register file).
  • Forward-declare functions in DFGOperations.cpp
  • UNUSED_PARAM for unused arguments
  • NO_RETURN for unimplemented function that ASSERT_NOT_REACHED
  • Fix argument types handled by OpInfo constructor.
  • Use SYMBOL_STRING instead of STRINGIZE for asm symbols.
  • Add files to Xcode project.
Location:
trunk/Source/JavaScriptCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r96171 r96175  
     12011-09-27  Gavin Barraclough  <barraclough@apple.com>
     2
     3        Get JSVALUE32_64 DFG JIT building on OS X.
     4        https://bugs.webkit.org/show_bug.cgi?id=68961
     5
     6        Reviewed by Geoff Garen.
     7
     8        * Merge bug #68763 (DFG JIT should not eagerly initialize integer tags in the register file).
     9        * Forward-declare functions in DFGOperations.cpp
     10        * UNUSED_PARAM for unused arguments
     11        * NO_RETURN for unimplemented function that ASSERT_NOT_REACHED
     12        * Fix argument types handled by OpInfo constructor.
     13        * Use SYMBOL_STRING instead of STRINGIZE for asm symbols.
     14        * Add files to Xcode project.
     15
    1162011-09-27  Yuqiang Xian  <yuqiang.xian@intel.com>
    217
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r95895 r96175  
    297297                86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86704B8212DBA33700A9FE7B /* YarrPattern.cpp */; };
    298298                86704B8A12DBA33700A9FE7B /* YarrPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8312DBA33700A9FE7B /* YarrPattern.h */; settings = {ATTRIBUTES = (Private, ); }; };
     299                86880F1C14328BB900B08D42 /* DFGJITCodeGenerator32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86880F1814328BB900B08D42 /* DFGJITCodeGenerator32_64.cpp */; };
     300                86880F1D14328BB900B08D42 /* DFGJITCompiler32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86880F1914328BB900B08D42 /* DFGJITCompiler32_64.cpp */; };
     301                86880F1E14328BB900B08D42 /* DFGJITCompilerInlineMethods.h in Headers */ = {isa = PBXBuildFile; fileRef = 86880F1A14328BB900B08D42 /* DFGJITCompilerInlineMethods.h */; };
     302                86880F1F14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86880F1B14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp */; };
    299303                868BFA08117CEFD100B908B1 /* AtomicString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 868BFA00117CEFD100B908B1 /* AtomicString.cpp */; };
    300304                868BFA09117CEFD100B908B1 /* AtomicString.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA01117CEFD100B908B1 /* AtomicString.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    10551059                867FC35F11B763950025105E /* JavaScriptCore.JSVALUE32_64only.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = JavaScriptCore.JSVALUE32_64only.exp; sourceTree = "<group>"; };
    10561060                867FC36111B763950025105E /* JavaScriptCore.JSVALUE64only.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = JavaScriptCore.JSVALUE64only.exp; sourceTree = "<group>"; };
     1061                86880F1814328BB900B08D42 /* DFGJITCodeGenerator32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGJITCodeGenerator32_64.cpp; path = dfg/DFGJITCodeGenerator32_64.cpp; sourceTree = "<group>"; };
     1062                86880F1914328BB900B08D42 /* DFGJITCompiler32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGJITCompiler32_64.cpp; path = dfg/DFGJITCompiler32_64.cpp; sourceTree = "<group>"; };
     1063                86880F1A14328BB900B08D42 /* DFGJITCompilerInlineMethods.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGJITCompilerInlineMethods.h; path = dfg/DFGJITCompilerInlineMethods.h; sourceTree = "<group>"; };
     1064                86880F1B14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGSpeculativeJIT32_64.cpp; path = dfg/DFGSpeculativeJIT32_64.cpp; sourceTree = "<group>"; };
    10571065                868BFA00117CEFD100B908B1 /* AtomicString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AtomicString.cpp; path = text/AtomicString.cpp; sourceTree = "<group>"; };
    10581066                868BFA01117CEFD100B908B1 /* AtomicString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtomicString.h; path = text/AtomicString.h; sourceTree = "<group>"; };
     
    22482256                        isa = PBXGroup;
    22492257                        children = (
    2250                                 0FD82EF31423073900179C94 /* DFGIntrinsic.h */,
    2251                                 0FD82E52141DAEDE00179C94 /* DFGOSREntry.cpp */,
    2252                                 0FD82E53141DAEDE00179C94 /* DFGOSREntry.h */,
     2258                                86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */,
     2259                                86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */,
    22532260                                0FD82E1E14172C2F00179C94 /* DFGCapabilities.cpp */,
    22542261                                0FD82E1F14172C2F00179C94 /* DFGCapabilities.h */,
    2255                                 0FD3C82414115D2200FD81CB /* DFGPropagator.h */,
    2256                                 0FD3C82314115D1A00FD81CB /* DFGPropagator.cpp */,
    22572262                                0FD3C82214115D0E00FD81CB /* DFGDriver.h */,
    22582263                                0FD3C82014115CF800FD81CB /* DFGDriver.cpp */,
    2259                                 86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */,
    2260                                 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */,
    22612264                                86AE6C4B136A11E400963012 /* DFGFPRInfo.h */,
    22622265                                86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */,
    22632266                                86AE6C4C136A11E400963012 /* DFGGPRInfo.h */,
    22642267                                86EC9DB71328DF82002B2AD7 /* DFGGraph.cpp */,
     2268                                0FD82EF31423073900179C94 /* DFGIntrinsic.h */,
    22652269                                86EC9DB81328DF82002B2AD7 /* DFGGraph.h */,
    22662270                                86EC9DB91328DF82002B2AD7 /* DFGJITCodeGenerator.cpp */,
    22672271                                86EC9DBA1328DF82002B2AD7 /* DFGJITCodeGenerator.h */,
     2272                                86880F1814328BB900B08D42 /* DFGJITCodeGenerator32_64.cpp */,
    22682273                                86EC9DBB1328DF82002B2AD7 /* DFGJITCompiler.cpp */,
    22692274                                86EC9DBC1328DF82002B2AD7 /* DFGJITCompiler.h */,
     2275                                86880F1914328BB900B08D42 /* DFGJITCompiler32_64.cpp */,
     2276                                86880F1A14328BB900B08D42 /* DFGJITCompilerInlineMethods.h */,
    22702277                                86ECA3E9132DEF1C002B2AD7 /* DFGNode.h */,
     2278                                0FD82E52141DAEDE00179C94 /* DFGOSREntry.cpp */,
     2279                                0FD82E53141DAEDE00179C94 /* DFGOSREntry.h */,
    22712280                                86EC9DBF1328DF82002B2AD7 /* DFGOperations.cpp */,
    22722281                                86EC9DC01328DF82002B2AD7 /* DFGOperations.h */,
     2282                                0FD3C82414115D2200FD81CB /* DFGPropagator.h */,
     2283                                0FD3C82314115D1A00FD81CB /* DFGPropagator.cpp */,
    22732284                                86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */,
    22742285                                86BB09BE138E381B0056702F /* DFGRepatch.cpp */,
     
    22772288                                86EC9DC21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp */,
    22782289                                86EC9DC31328DF82002B2AD7 /* DFGSpeculativeJIT.h */,
     2290                                86880F1B14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp */,
    22792291                        );
    22802292                        name = dfg;
     
    28262838                                86FA9E92142BBB2E001773B7 /* JSBoundFunction.h in Headers */,
    28272839                                A7521E131429169A003C8D0C /* CardSet.h in Headers */,
     2840                                86880F1E14328BB900B08D42 /* DFGJITCompilerInlineMethods.h in Headers */,
    28282841                        );
    28292842                        runOnlyForDeploymentPostprocessing = 0;
     
    33513364                                86FA9E91142BBB2E001773B7 /* JSBoundFunction.cpp in Sources */,
    33523365                                0F604E8B142D696D009CEB92 /* BitVector.cpp in Sources */,
     3366                                86880F1C14328BB900B08D42 /* DFGJITCodeGenerator32_64.cpp in Sources */,
     3367                                86880F1D14328BB900B08D42 /* DFGJITCompiler32_64.cpp in Sources */,
     3368                                86880F1F14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp in Sources */,
    33533369                        );
    33543370                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/JavaScriptCore/dfg/DFGJITCodeGenerator.h

    r95902 r96175  
    389389        m_jit.loadDouble(JITCompiler::addressFor(spillMe), info.fpr());
    390390#elif USE(JSVALUE32_64)
     391        UNUSED_PARAM(canTrample);
    391392        ASSERT(info.registerFormat() == DataFormatDouble || info.registerFormat() == DataFormatJSDouble);
    392393        m_jit.emitLoadDouble(nodeIndex, info.fpr());
     
    12841285        appendCallWithExceptionCheck(operation);
    12851286    }
    1286     void callOperation(D_DFGOperation_DD operation, FPRReg result, FPRReg arg1, FPRReg arg2)
     1287
     1288    void NO_RETURN callOperation(D_DFGOperation_DD operation, FPRReg result, FPRReg arg1, FPRReg arg2)
    12871289    {
    12881290        ASSERT(isFlushed());
     
    12901292        // FIXME: Need to to pass doubles.
    12911293        ASSERT_NOT_REACHED();
     1294        UNUSED_PARAM(arg1);
     1295        UNUSED_PARAM(arg2);
    12921296
    12931297        m_jit.appendCall(operation);
  • trunk/Source/JavaScriptCore/dfg/DFGJITCodeGenerator32_64.cpp

    r96171 r96175  
    220220{
    221221    // FIXME: For double we could fill with a FPR.
     222    UNUSED_PARAM(fpr);
     223
    222224    Node& node = m_jit.graph()[nodeIndex];
    223225    VirtualRegister virtualRegister = node.virtualRegister();
     
    18941896}
    18951897
    1896 void JITCodeGenerator::emitCall(Node& node)
     1898void NO_RETURN JITCodeGenerator::emitCall(Node& node)
    18971899{
    18981900    // FIXME: It's not supported yet!
    18991901    ASSERT_NOT_REACHED();
     1902    UNUSED_PARAM(node);
    19001903}
    19011904
  • trunk/Source/JavaScriptCore/dfg/DFGJITCompiler32_64.cpp

    r96171 r96175  
    8080
    8181// This method used to fill a JSValue to a GPR when linking speculative -> non-speculative.
    82 void JITCompiler::fillToJS(NodeIndex nodeIndex, GPRReg gpr)
     82void NO_RETURN JITCompiler::fillToJS(NodeIndex nodeIndex, GPRReg gpr)
    8383{
    8484    ASSERT_NOT_REACHED();
     85    UNUSED_PARAM(nodeIndex);
     86    UNUSED_PARAM(gpr);
    8587}
    8688
  • trunk/Source/JavaScriptCore/dfg/DFGNode.h

    r95930 r96175  
    334334// a constant index, argument, or identifier) from a NodeIndex.
    335335struct OpInfo {
    336     explicit OpInfo(int value) : m_value(value) { }
    337 #if USE(JSVALUE64)
    338     explicit OpInfo(unsigned value) : m_value(value) { }
    339 #endif
    340     explicit OpInfo(uintptr_t value) : m_value(value) { }
     336    explicit OpInfo(int32_t value) : m_value(static_cast<uintptr_t>(value)) { }
     337    explicit OpInfo(uint32_t value) : m_value(static_cast<uintptr_t>(value)) { }
     338    explicit OpInfo(size_t value) : m_value(static_cast<uintptr_t>(value)) { }
    341339    explicit OpInfo(void* value) : m_value(reinterpret_cast<uintptr_t>(value)) { }
    342340    uintptr_t m_value;
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r95933 r96175  
    3636#include "Operations.h"
    3737
     38
     39#if OS(DARWIN) || (OS(WINDOWS) && CPU(X86))
     40#define SYMBOL_STRING(name) "_" #name
     41#else
     42#define SYMBOL_STRING(name) #name
     43#endif
     44
    3845#if CPU(X86_64)
    3946#define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, register) \
    4047    asm( \
    41     ".globl _" STRINGIZE(function) "\n" \
    42     "_" STRINGIZE(function) ":" "\n" \
     48    ".globl " SYMBOL_STRING(function) "\n" \
     49    SYMBOL_STRING(function) ":" "\n" \
    4350        "mov (%rsp), %" STRINGIZE(register) "\n" \
    44         "jmp _" STRINGIZE(function) "WithReturnAddress" "\n" \
     51        "jmp " SYMBOL_STRING(function) "WithReturnAddress" "\n" \
    4552    );
    4653#elif CPU(X86)
    4754#define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, register) \
    4855    asm( \
    49     ".globl " STRINGIZE(function) "\n" \
    50     STRINGIZE(function) ":" "\n" \
     56    ".globl " SYMBOL_STRING(function) "\n" \
     57    SYMBOL_STRING(function) ":" "\n" \
    5158        "push (%esp)\n" \
    52         "jmp " STRINGIZE(function) "WithReturnAddress" "\n" \
     59        "jmp " SYMBOL_STRING(function) "WithReturnAddress" "\n" \
    5360    );
    5461#endif
     
    266273EncodedJSValue operationGetMethodOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
    267274#elif CPU(X86)
     275EncodedJSValue operationGetMethodOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName);
    268276FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetMethodOptimize);
    269277EncodedJSValue operationGetMethodOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName)
     
    288296EncodedJSValue operationGetByIdBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
    289297#elif CPU(X86)
     298EncodedJSValue operationGetByIdBuildListWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName);
    290299FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetByIdBuildList);
    291300EncodedJSValue operationGetByIdBuildListWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName)
     
    307316EncodedJSValue operationGetByIdProtoBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
    308317#elif CPU(X86)
     318EncodedJSValue operationGetByIdProtoBuildListWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName);
    309319FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetByIdProtoBuildList);
    310320EncodedJSValue operationGetByIdProtoBuildListWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName)
     
    326336EncodedJSValue operationGetByIdOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
    327337#elif CPU(X86)
     338EncodedJSValue operationGetByIdOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName);
    328339FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetByIdOptimize);
    329340EncodedJSValue operationGetByIdOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName)
     
    389400void operationPutByIdStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
    390401#elif CPU(X86)
     402void operationPutByIdStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName);
    391403FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdStrictOptimize);
    392404void operationPutByIdStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName)
     
    411423void operationPutByIdNonStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
    412424#elif CPU(X86)
     425void operationPutByIdNonStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName);
    413426FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdNonStrictOptimize);
    414427void operationPutByIdNonStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName)
     
    433446void operationPutByIdDirectStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
    434447#elif CPU(X86)
     448void operationPutByIdDirectStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName);
    435449FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdDirectStrictOptimize);
    436450void operationPutByIdDirectStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName)
     
    455469void operationPutByIdDirectNonStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
    456470#elif CPU(X86)
     471void operationPutByIdDirectNonStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName);
    457472FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdDirectNonStrictOptimize);
    458473void operationPutByIdDirectNonStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName)
     
    518533#if CPU(X86_64)
    519534asm (
    520 ".globl _" STRINGIZE(getHostCallReturnValue) "\n"
    521 "_" STRINGIZE(getHostCallReturnValue) ":" "\n"
     535".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     536SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
    522537    "mov -40(%r13), %r13\n"
    523538    "mov %r13, %rdi\n"
    524     "jmp _" STRINGIZE(getHostCallReturnValueWithExecState) "\n"
     539    "jmp " SYMBOL_STRING(getHostCallReturnValueWithExecState) "\n"
    525540);
    526541#elif CPU(X86)
    527542asm (
    528 ".globl " STRINGIZE(getHostCallReturnValue) "\n"
    529 STRINGIZE(getHostCallReturnValue) ":" "\n"
     543".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     544SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
    530545    "mov -40(%edi), %edi\n"
    531546    "push %edi\n"
    532     "jmp " STRINGIZE(getHostCallReturnValueWithExecState) "\n"
     547    "jmp " SYMBOL_STRING(getHostCallReturnValueWithExecState) "\n"
    533548);
    534549#endif
     
    638653void* operationLinkCallWithReturnAddress(ExecState* execCallee, ReturnAddressPtr returnAddress)
    639654#elif CPU(X86)
     655void* operationLinkCallWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* execCallee);
    640656FUNCTION_WRAPPER_WITH_ARG2_RETURN_ADDRESS(operationLinkCall);
    641657void* operationLinkCallWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* execCallee)
     
    650666void* operationLinkConstructWithReturnAddress(ExecState* execCallee, ReturnAddressPtr returnAddress)
    651667#elif CPU(X86)
     668void* operationLinkConstructWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* execCallee);
    652669FUNCTION_WRAPPER_WITH_ARG2_RETURN_ADDRESS(operationLinkConstruct);
    653670void* operationLinkConstructWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* execCallee)
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r95930 r96175  
    20972097        break;
    20982098    }
    2099        
     2099
    21002100    case ForceOSRExit: {
    21012101        terminateSpeculativeExecution();
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r96171 r96175  
    127127        fprintf(out, "-");
    128128        break;
     129    case AlreadyInRegisterFileAsUnboxedInt32:
     130        fprintf(out, "(int32)");
     131        break;
    129132    case InGPR:
    130133        fprintf(out, "%%%s", GPRInfo::debugName(gpr()));
     
    168171    ASSERT(m_bytecodeIndex != std::numeric_limits<uint32_t>::max());
    169172    for (unsigned argument = 0; argument < m_arguments.size(); ++argument)
    170         m_arguments[argument] = jit->computeValueRecoveryFor(jit->m_arguments[argument]);
     173        m_arguments[argument] = jit->computeValueRecoveryFor(operandForArgument(argument), jit->m_arguments[argument]);
    171174    for (unsigned variable = 0; variable < m_variables.size(); ++variable)
    172         m_variables[variable] = jit->computeValueRecoveryFor(jit->m_variables[variable]);
     175        m_variables[variable] = jit->computeValueRecoveryFor(variable, jit->m_variables[variable]);
    173176}
    174177
     
    387390GPRReg SpeculativeJIT::fillSpeculateBoolean(NodeIndex nodeIndex)
    388391{
     392    ASSERT_NOT_REACHED();
     393    UNUSED_PARAM(nodeIndex);
     394
    389395#if ENABLE(DFG_DEBUG_VERBOSE)
    390396     fprintf(stderr, "SpecBool@%d   ", nodeIndex);
     
    20112017    }
    20122018
     2019    case ForceOSRExit: {
     2020        terminateSpeculativeExecution();
     2021        break;
     2022    }
     2023
    20132024    case Phantom:
    20142025        // This is a no-op.
     
    21332144}
    21342145
    2135 // For any vars that we will be treating as numeric, write 0 to
    2136 // the var on entry. Throughout the block we will only read/write
    2137 // to the payload, by writing the tag now we prevent the GC from
    2138 // misinterpreting values as pointers.
    2139 void SpeculativeJIT::initializeVariableTypes()
    2140 {
    2141     ASSERT(!m_compileIndex);
    2142     for (int var = 0; var < (int)m_jit.graph().predictions().numberOfVariables(); ++var) {
    2143         if (isInt32Prediction(m_jit.graph().getPrediction(var)))
    2144             m_jit.store32(TrustedImm32(JSValue::Int32Tag), JITCompiler::tagFor((VirtualRegister)var));
    2145     }
    2146 }
    2147 
    21482146bool SpeculativeJIT::compile()
    21492147{
    21502148    checkArgumentTypes();
    2151     initializeVariableTypes();
    21522149
    21532150    ASSERT(!m_compileIndex);
     
    21582155}
    21592156
    2160 ValueRecovery SpeculativeJIT::computeValueRecoveryFor(const ValueSource& valueSource)
     2157ValueRecovery SpeculativeJIT::computeValueRecoveryFor(int operand, const ValueSource& valueSource)
    21612158{
    2162     if (!valueSource.isSet())
     2159    if (!valueSource.isSet()) {
     2160        if (m_bytecodeIndexForOSR && isInt32Prediction(m_jit.graph().getPrediction(operand)))
     2161            return ValueRecovery::alreadyInRegisterFileAsUnboxedInt32();
    21632162        return ValueRecovery::alreadyInRegisterFile();
     2163    }
    21642164
    21652165    if (m_jit.isConstant(valueSource.nodeIndex()))
Note: See TracChangeset for help on using the changeset viewer.