Ignore:
Timestamp:
Jan 29, 2014, 11:18:54 AM (11 years ago)
Author:
[email protected]
Message:

Merge the jsCStack branch
https://bugs.webkit.org/show_bug.cgi?id=127763

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:

Changes from http://svn.webkit.org/repository/webkit/branches/jsCStack
up to changeset 162958.

Source/WebCore:

Changes from http://svn.webkit.org/repository/webkit/branches/jsCStack
up to changeset 162958.

Source/WTF:

Changes from http://svn.webkit.org/repository/webkit/branches/jsCStack
up to changeset 162958.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp

    r162940 r163027  
    11/*
    2  * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2011, 2012, 2013, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    5757#if ENABLE(DFG_JIT)
    5858static CompilationResult compileImpl(
    59     VM& vm, CodeBlock* codeBlock, CompilationMode mode, unsigned osrEntryBytecodeIndex,
    60     const Operands<JSValue>& mustHandleValues,
    61     PassRefPtr<DeferredCompilationCallback> callback, Worklist* worklist)
     59    VM& vm, CodeBlock* codeBlock, CodeBlock* profiledDFGCodeBlock, CompilationMode mode,
     60    unsigned osrEntryBytecodeIndex, const Operands<JSValue>& mustHandleValues,
     61    PassRefPtr<DeferredCompilationCallback> callback)
    6262{
    6363    SamplingRegion samplingRegion("DFG Compilation (Driver)");
     
    6868    ASSERT(codeBlock->alternative());
    6969    ASSERT(codeBlock->alternative()->jitType() == JITCode::BaselineJIT);
     70    ASSERT(!profiledDFGCodeBlock || profiledDFGCodeBlock->jitType() == JITCode::DFGJIT);
    7071   
    7172    if (!Options::useDFGJIT() || !MacroAssembler::supportsFloatingPoint())
     
    8990    vm.getCTIStub(osrExitGenerationThunkGenerator);
    9091    vm.getCTIStub(throwExceptionFromCallSlowPathGenerator);
    91     vm.getCTIStub(linkCallThunkGenerator);
    92     vm.getCTIStub(linkConstructThunkGenerator);
    93     vm.getCTIStub(linkClosureCallThunkGenerator);
    94     vm.getCTIStub(virtualCallThunkGenerator);
    95     vm.getCTIStub(virtualConstructThunkGenerator);
     92    if (mode == DFGMode) {
     93        vm.getCTIStub(linkCallThunkGenerator);
     94        vm.getCTIStub(linkConstructThunkGenerator);
     95        vm.getCTIStub(linkClosureCallThunkGenerator);
     96        vm.getCTIStub(virtualCallThunkGenerator);
     97        vm.getCTIStub(virtualConstructThunkGenerator);
     98    } else {
     99        vm.getCTIStub(linkCallThatPreservesRegsThunkGenerator);
     100        vm.getCTIStub(linkConstructThatPreservesRegsThunkGenerator);
     101        vm.getCTIStub(linkClosureCallThatPreservesRegsThunkGenerator);
     102        vm.getCTIStub(virtualCallThatPreservesRegsThunkGenerator);
     103        vm.getCTIStub(virtualConstructThatPreservesRegsThunkGenerator);
     104    }
    96105   
    97106    RefPtr<Plan> plan = adoptRef(
    98         new Plan(codeBlock, mode, osrEntryBytecodeIndex, mustHandleValues));
     107        new Plan(codeBlock, profiledDFGCodeBlock, mode, osrEntryBytecodeIndex, mustHandleValues));
    99108   
    100     if (worklist) {
     109    bool enableConcurrentJIT;
     110#if ENABLE(CONCURRENT_JIT)
     111    enableConcurrentJIT = Options::enableConcurrentJIT();
     112#else // ENABLE(CONCURRENT_JIT)
     113    enableConcurrentJIT = false;
     114#endif // ENABLE(CONCURRENT_JIT)
     115    if (enableConcurrentJIT) {
     116        Worklist* worklist = ensureGlobalWorklistFor(mode);
    101117        plan->callback = callback;
    102118        if (logCompilationChanges())
     
    111127#else // ENABLE(DFG_JIT)
    112128static CompilationResult compileImpl(
    113     VM&, CodeBlock*, CompilationMode, unsigned, const Operands<JSValue>&,
    114     PassRefPtr<DeferredCompilationCallback>, Worklist*)
     129    VM&, CodeBlock*, CodeBlock*, CompilationMode, unsigned, const Operands<JSValue>&,
     130    PassRefPtr<DeferredCompilationCallback>)
    115131{
    116132    return CompilationFailed;
     
    119135
    120136CompilationResult compile(
    121     VM& vm, CodeBlock* codeBlock, CompilationMode mode, unsigned osrEntryBytecodeIndex,
    122     const Operands<JSValue>& mustHandleValues,
    123     PassRefPtr<DeferredCompilationCallback> passedCallback, Worklist* worklist)
     137    VM& vm, CodeBlock* codeBlock, CodeBlock* profiledDFGCodeBlock, CompilationMode mode,
     138    unsigned osrEntryBytecodeIndex, const Operands<JSValue>& mustHandleValues,
     139    PassRefPtr<DeferredCompilationCallback> passedCallback)
    124140{
    125141    RefPtr<DeferredCompilationCallback> callback = passedCallback;
    126142    CompilationResult result = compileImpl(
    127         vm, codeBlock, mode, osrEntryBytecodeIndex, mustHandleValues, callback, worklist);
     143        vm, codeBlock, profiledDFGCodeBlock, mode, osrEntryBytecodeIndex, mustHandleValues,
     144        callback);
    128145    if (result != CompilationDeferred)
    129146        callback->compilationDidComplete(codeBlock, result);
Note: See TracChangeset for help on using the changeset viewer.