Changeset 161543 in webkit


Ignore:
Timestamp:
Jan 8, 2014 8:11:59 PM (10 years ago)
Author:
fpizlo@apple.com
Message:

FTL should not use the inputs of an add or sub as the live-at-exit values in an overflow check, if the values aren't live after
https://bugs.webkit.org/show_bug.cgi?id=126545

Not yet reviewed.

Introduces the notion of an ExitValue that is computed by doing some math on two
exit arguments. This gets used by LowerDFGToLLVM by tracking the
AvailableRecoveries - i.e. the set of ways we know how to recover the value of a
node by performing math on LValue's - and then trying to pick an AvailableRecovery
if we try to exit with an Availability pointing to a Node that isn't a constant.
The compileArithAddOrSub() code adds AvailableRecoveries for the ways you could
recovery the left or right operand by using the result.

Doing this uncovered a bug in stackmap constant parsing where we were casting a
32-bit value to 16-bit, thereby losing the top bits.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • ftl/FTLAvailableRecovery.cpp: Added.

(JSC::FTL::AvailableRecovery::dump):

  • ftl/FTLAvailableRecovery.h: Added.

(JSC::FTL::AvailableRecovery::AvailableRecovery):
(JSC::FTL::AvailableRecovery::node):
(JSC::FTL::AvailableRecovery::format):
(JSC::FTL::AvailableRecovery::opcode):
(JSC::FTL::AvailableRecovery::left):
(JSC::FTL::AvailableRecovery::right):

  • ftl/FTLExitValue.cpp:

(JSC::FTL::ExitValue::dumpInContext):

  • ftl/FTLExitValue.h:

(JSC::FTL::ExitValue::recovery):
(JSC::FTL::ExitValue::isRecovery):
(JSC::FTL::ExitValue::leftRecoveryArgument):
(JSC::FTL::ExitValue::rightRecoveryArgument):
(JSC::FTL::ExitValue::recoveryFormat):
(JSC::FTL::ExitValue::recoveryOpcode):
(JSC::FTL::ExitValue::valueFormat):

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileArithAddOrSub):
(JSC::FTL::LowerDFGToLLVM::appendOSRExit):
(JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode):
(JSC::FTL::LowerDFGToLLVM::doesKill):
(JSC::FTL::LowerDFGToLLVM::addAvailableRecovery):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • ftl/FTLRecoveryOpcode.cpp: Added.

(WTF::printInternal):

  • ftl/FTLRecoveryOpcode.h: Added.
  • ftl/FTLStackMaps.h:
  • tests/stress/add-constant-overflow-recovery.js: Added.

(foo):

  • tests/stress/add-int52-constant-overflow-recovery.js: Added.

(foo):

  • tests/stress/add-int52-large-constant-overflow-recovery.js: Added.

(foo):

  • tests/stress/add-overflow-recovery.js: Added.

(foo):

  • tests/stress/add-small-constant-overflow-recovery.js: Added.

(foo):

Location:
branches/jsCStack/Source/JavaScriptCore
Files:
9 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/jsCStack/Source/JavaScriptCore/ChangeLog

    r161531 r161543  
     12014-01-08  Filip Pizlo  <fpizlo@apple.com>
     2
     3        FTL should not use the inputs of an add or sub as the live-at-exit values in an overflow check, if the values aren't live after
     4        https://bugs.webkit.org/show_bug.cgi?id=126545
     5
     6        Not yet reviewed.
     7       
     8        Introduces the notion of an ExitValue that is computed by doing some math on two
     9        exit arguments. This gets used by LowerDFGToLLVM by tracking the
     10        AvailableRecoveries - i.e. the set of ways we know how to recover the value of a
     11        node by performing math on LValue's - and then trying to pick an AvailableRecovery
     12        if we try to exit with an Availability pointing to a Node that isn't a constant.
     13        The compileArithAddOrSub() code adds AvailableRecoveries for the ways you could
     14        recovery the left or right operand by using the result.
     15       
     16        Doing this uncovered a bug in stackmap constant parsing where we were casting a
     17        32-bit value to 16-bit, thereby losing the top bits.
     18
     19        * JavaScriptCore.xcodeproj/project.pbxproj:
     20        * ftl/FTLAvailableRecovery.cpp: Added.
     21        (JSC::FTL::AvailableRecovery::dump):
     22        * ftl/FTLAvailableRecovery.h: Added.
     23        (JSC::FTL::AvailableRecovery::AvailableRecovery):
     24        (JSC::FTL::AvailableRecovery::node):
     25        (JSC::FTL::AvailableRecovery::format):
     26        (JSC::FTL::AvailableRecovery::opcode):
     27        (JSC::FTL::AvailableRecovery::left):
     28        (JSC::FTL::AvailableRecovery::right):
     29        * ftl/FTLExitValue.cpp:
     30        (JSC::FTL::ExitValue::dumpInContext):
     31        * ftl/FTLExitValue.h:
     32        (JSC::FTL::ExitValue::recovery):
     33        (JSC::FTL::ExitValue::isRecovery):
     34        (JSC::FTL::ExitValue::leftRecoveryArgument):
     35        (JSC::FTL::ExitValue::rightRecoveryArgument):
     36        (JSC::FTL::ExitValue::recoveryFormat):
     37        (JSC::FTL::ExitValue::recoveryOpcode):
     38        (JSC::FTL::ExitValue::valueFormat):
     39        * ftl/FTLLowerDFGToLLVM.cpp:
     40        (JSC::FTL::LowerDFGToLLVM::compileNode):
     41        (JSC::FTL::LowerDFGToLLVM::compileArithAddOrSub):
     42        (JSC::FTL::LowerDFGToLLVM::appendOSRExit):
     43        (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode):
     44        (JSC::FTL::LowerDFGToLLVM::doesKill):
     45        (JSC::FTL::LowerDFGToLLVM::addAvailableRecovery):
     46        * ftl/FTLOSRExitCompiler.cpp:
     47        (JSC::FTL::compileStub):
     48        * ftl/FTLRecoveryOpcode.cpp: Added.
     49        (WTF::printInternal):
     50        * ftl/FTLRecoveryOpcode.h: Added.
     51        * ftl/FTLStackMaps.h:
     52        * tests/stress/add-constant-overflow-recovery.js: Added.
     53        (foo):
     54        * tests/stress/add-int52-constant-overflow-recovery.js: Added.
     55        (foo):
     56        * tests/stress/add-int52-large-constant-overflow-recovery.js: Added.
     57        (foo):
     58        * tests/stress/add-overflow-recovery.js: Added.
     59        (foo):
     60        * tests/stress/add-small-constant-overflow-recovery.js: Added.
     61        (foo):
     62
    1632014-01-08  Michael Saboff  <msaboff@apple.com>
    264
  • branches/jsCStack/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r161409 r161543  
    237237                0F485321187750560083B687 /* DFGArithMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F48531F187750560083B687 /* DFGArithMode.cpp */; };
    238238                0F485322187750560083B687 /* DFGArithMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F485320187750560083B687 /* DFGArithMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
     239                0F485327187DFDEC0083B687 /* FTLAvailableRecovery.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F485323187DFDEC0083B687 /* FTLAvailableRecovery.cpp */; };
     240                0F485328187DFDEC0083B687 /* FTLAvailableRecovery.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F485324187DFDEC0083B687 /* FTLAvailableRecovery.h */; settings = {ATTRIBUTES = (Private, ); }; };
     241                0F485329187DFDEC0083B687 /* FTLRecoveryOpcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F485325187DFDEC0083B687 /* FTLRecoveryOpcode.cpp */; };
     242                0F48532A187DFDEC0083B687 /* FTLRecoveryOpcode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F485326187DFDEC0083B687 /* FTLRecoveryOpcode.h */; settings = {ATTRIBUTES = (Private, ); }; };
    239243                0F493AFA16D0CAD30084508B /* SourceProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F493AF816D0CAD10084508B /* SourceProvider.cpp */; };
    240244                0F4B94DC17B9F07500DD03A4 /* TypedArrayInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4B94DB17B9F07500DD03A4 /* TypedArrayInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    15671571                0F48531F187750560083B687 /* DFGArithMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGArithMode.cpp; path = dfg/DFGArithMode.cpp; sourceTree = "<group>"; };
    15681572                0F485320187750560083B687 /* DFGArithMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGArithMode.h; path = dfg/DFGArithMode.h; sourceTree = "<group>"; };
     1573                0F485323187DFDEC0083B687 /* FTLAvailableRecovery.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLAvailableRecovery.cpp; path = ftl/FTLAvailableRecovery.cpp; sourceTree = "<group>"; };
     1574                0F485324187DFDEC0083B687 /* FTLAvailableRecovery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLAvailableRecovery.h; path = ftl/FTLAvailableRecovery.h; sourceTree = "<group>"; };
     1575                0F485325187DFDEC0083B687 /* FTLRecoveryOpcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLRecoveryOpcode.cpp; path = ftl/FTLRecoveryOpcode.cpp; sourceTree = "<group>"; };
     1576                0F485326187DFDEC0083B687 /* FTLRecoveryOpcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLRecoveryOpcode.h; path = ftl/FTLRecoveryOpcode.h; sourceTree = "<group>"; };
    15691577                0F493AF816D0CAD10084508B /* SourceProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SourceProvider.cpp; sourceTree = "<group>"; };
    15701578                0F4B94DB17B9F07500DD03A4 /* TypedArrayInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypedArrayInlines.h; sourceTree = "<group>"; };
     
    28652873                                0FEA0A191708B00700BB722C /* FTLAbstractHeapRepository.cpp */,
    28662874                                0FEA0A1A1708B00700BB722C /* FTLAbstractHeapRepository.h */,
     2875                                0F485323187DFDEC0083B687 /* FTLAvailableRecovery.cpp */,
     2876                                0F485324187DFDEC0083B687 /* FTLAvailableRecovery.h */,
    28672877                                0FEA09FE170513DB00BB722C /* FTLCapabilities.cpp */,
    28682878                                0FEA09FF170513DB00BB722C /* FTLCapabilities.h */,
     
    29132923                                0FEA0A291709629600BB722C /* FTLOutput.cpp */,
    29142924                                0FEA0A06170513DB00BB722C /* FTLOutput.h */,
     2925                                0F485325187DFDEC0083B687 /* FTLRecoveryOpcode.cpp */,
     2926                                0F485326187DFDEC0083B687 /* FTLRecoveryOpcode.h */,
    29152927                                0F6B1CBF1862C47800845D97 /* FTLRegisterAtOffset.cpp */,
    29162928                                0F6B1CC01862C47800845D97 /* FTLRegisterAtOffset.h */,
     
    44204432                                A1A009C01831A22D00CF8711 /* MacroAssemblerARM64.h in Headers */,
    44214433                                86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */,
     4434                                0F485328187DFDEC0083B687 /* FTLAvailableRecovery.h in Headers */,
    44224435                                0F256C361627B0AD007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h in Headers */,
    44234436                                0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */,
     
    45524565                                A59455931824744700CC3843 /* JSGlobalObjectDebuggable.h in Headers */,
    45534566                                0FEA0A0A170513DB00BB722C /* FTLCapabilities.h in Headers */,
     4567                                0F48532A187DFDEC0083B687 /* FTLRecoveryOpcode.h in Headers */,
    45544568                                0FEA0A231709606900BB722C /* FTLCommonValues.h in Headers */,
    45554569                                0FEA0A0C170513DB00BB722C /* FTLCompile.h in Headers */,
     
    55665580                                0FD8A32717D51F5700CA2C40 /* DFGTierUpCheckInjectionPhase.cpp in Sources */,
    55675581                                0FD8A32917D51F5700CA2C40 /* DFGToFTLDeferredCompilationCallback.cpp in Sources */,
     5582                                0F485327187DFDEC0083B687 /* FTLAvailableRecovery.cpp in Sources */,
    55685583                                0FD8A32B17D51F5700CA2C40 /* DFGToFTLForOSREntryDeferredCompilationCallback.cpp in Sources */,
    55695584                                0F63944015C75F1D006A597C /* DFGTypeCheckHoistingPhase.cpp in Sources */,
     
    56985713                                C25D709B16DE99F400FCA6BC /* JSManagedValue.mm in Sources */,
    56995714                                A700874117CBE8EB00C3E643 /* JSMap.cpp in Sources */,
     5715                                0F485329187DFDEC0083B687 /* FTLRecoveryOpcode.cpp in Sources */,
    57005716                                14874AE315EBDE4A002E3587 /* JSNameScope.cpp in Sources */,
    57015717                                A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */,
  • branches/jsCStack/Source/JavaScriptCore/ftl/FTLExitValue.cpp

    r159394 r161543  
    11/*
    2  * Copyright (C) 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    6060        out.print("InJSStackAsDouble:r", virtualRegister());
    6161        return;
     62    case ExitValueRecovery:
     63        out.print("Recovery(", recoveryOpcode(), ", arg", leftRecoveryArgument(), ", arg", rightRecoveryArgument(), ", ", recoveryFormat(), ")");
     64        return;
    6265    }
    6366   
  • branches/jsCStack/Source/JavaScriptCore/ftl/FTLExitValue.h

    r160600 r161543  
    11/*
    2  * Copyright (C) 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3232
    3333#include "FTLExitArgument.h"
     34#include "FTLRecoveryOpcode.h"
    3435#include "JSCJSValue.h"
    3536#include "VirtualRegister.h"
     
    5253    ExitValueInJSStackAsInt32,
    5354    ExitValueInJSStackAsInt52,
    54     ExitValueInJSStackAsDouble
     55    ExitValueInJSStackAsDouble,
     56    ExitValueRecovery
    5557};
    5658
     
    116118        result.m_kind = ExitValueArgument;
    117119        result.u.argument = argument.representation();
     120        return result;
     121    }
     122   
     123    static ExitValue recovery(RecoveryOpcode opcode, unsigned leftArgument, unsigned rightArgument, ValueFormat format)
     124    {
     125        ExitValue result;
     126        result.m_kind = ExitValueRecovery;
     127        result.u.recovery.opcode = opcode;
     128        result.u.recovery.leftArgument = leftArgument;
     129        result.u.recovery.rightArgument = rightArgument;
     130        result.u.recovery.format = format;
    118131        return result;
    119132    }
     
    136149    bool isConstant() const { return kind() == ExitValueConstant; }
    137150    bool isArgument() const { return kind() == ExitValueArgument; }
     151    bool isRecovery() const { return kind() == ExitValueRecovery; }
    138152   
    139153    ExitArgument exitArgument() const
     
    141155        ASSERT(isArgument());
    142156        return ExitArgument(u.argument);
     157    }
     158   
     159    unsigned leftRecoveryArgument() const
     160    {
     161        ASSERT(isRecovery());
     162        return u.recovery.leftArgument;
     163    }
     164   
     165    unsigned rightRecoveryArgument() const
     166    {
     167        ASSERT(isRecovery());
     168        return u.recovery.rightArgument;
     169    }
     170   
     171    ValueFormat recoveryFormat() const
     172    {
     173        ASSERT(isRecovery());
     174        return static_cast<ValueFormat>(u.recovery.format);
     175    }
     176   
     177    RecoveryOpcode recoveryOpcode() const
     178    {
     179        ASSERT(isRecovery());
     180        return static_cast<RecoveryOpcode>(u.recovery.opcode);
    143181    }
    144182   
     
    191229        case ExitValueInJSStackAsDouble:
    192230            return ValueFormatDouble;
     231           
     232        case ExitValueRecovery:
     233            return recoveryFormat();
    193234        }
    194235       
     
    206247        EncodedJSValue constant;
    207248        int virtualRegister;
     249        struct {
     250            uint16_t leftArgument;
     251            uint16_t rightArgument;
     252            uint16_t opcode;
     253            uint16_t format;
     254        } recovery;
    208255    } u;
    209256};
  • branches/jsCStack/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp

    r161515 r161543  
    11/*
    2  * Copyright (C) 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3333#include "DFGInPlaceAbstractState.h"
    3434#include "FTLAbstractHeapRepository.h"
     35#include "FTLAvailableRecovery.h"
    3536#include "FTLForOSREntryJITCode.h"
    3637#include "FTLFormattedValue.h"
     
    257258            dataLog("Lowering ", m_node, "\n");
    258259       
     260        m_availableRecoveries.resize(0);
     261       
    259262        bool shouldExecuteEffects = m_interpreter.startExecuting(m_node);
    260263       
     
    296299            break;
    297300        case ArithAdd:
    298             compileAddSub();
    299             break;
    300301        case ArithSub:
    301             compileAddSub();
     302            compileArithAddOrSub();
    302303            break;
    303304        case ArithMul:
     
    809810    }
    810811   
    811     void compileAddSub()
     812    void compileArithAddOrSub()
    812813    {
    813814        bool isSub =  m_node->op() == ArithSub;
     
    822823            }
    823824
    824             LValue result = isSub ? m_out.subWithOverflow32(left, right) : m_out.addWithOverflow32(left, right);
     825            LValue result;
     826            if (!isSub) {
     827                result = m_out.addWithOverflow32(left, right);
     828               
     829                if (doesKill(m_node->child2())) {
     830                    addAvailableRecovery(
     831                        m_node->child2(), SubRecovery,
     832                        m_out.extractValue(result, 0), left, ValueFormatInt32);
     833                } else if (doesKill(m_node->child1())) {
     834                    addAvailableRecovery(
     835                        m_node->child1(), SubRecovery,
     836                        m_out.extractValue(result, 0), right, ValueFormatInt32);
     837                }
     838            } else {
     839                result = m_out.subWithOverflow32(left, right);
     840               
     841                if (doesKill(m_node->child2())) {
     842                    // result = left - right
     843                    // result - left = -right
     844                    // right = left - result
     845                    addAvailableRecovery(
     846                        m_node->child2(), SubRecovery,
     847                        left, m_out.extractValue(result, 0), ValueFormatInt32);
     848                } else if (doesKill(m_node->child1())) {
     849                    // result = left - right
     850                    // result + right = left
     851                    addAvailableRecovery(
     852                        m_node->child1(), AddRecovery,
     853                        m_out.extractValue(result, 0), right, ValueFormatInt32);
     854                }
     855            }
    825856
    826857            speculate(Overflow, noValue(), 0, m_out.extractValue(result, 1));
     
    842873            LValue right = lowInt52(m_node->child2());
    843874
    844             LValue result = isSub ? m_out.subWithOverflow64(left, right) : m_out.addWithOverflow64(left, right);
     875            LValue result;
     876            if (!isSub) {
     877                result = m_out.addWithOverflow64(left, right);
     878               
     879                if (doesKill(m_node->child2())) {
     880                    addAvailableRecovery(
     881                        m_node->child2(), SubRecovery,
     882                        m_out.extractValue(result, 0), left, ValueFormatInt52);
     883                } else if (doesKill(m_node->child1())) {
     884                    addAvailableRecovery(
     885                        m_node->child1(), SubRecovery,
     886                        m_out.extractValue(result, 0), right, ValueFormatInt52);
     887                }
     888            } else {
     889                result = m_out.subWithOverflow64(left, right);
     890               
     891                if (doesKill(m_node->child2())) {
     892                    // result = left - right
     893                    // result - left = -right
     894                    // right = left - result
     895                    addAvailableRecovery(
     896                        m_node->child2(), SubRecovery,
     897                        left, m_out.extractValue(result, 0), ValueFormatInt52);
     898                } else if (doesKill(m_node->child1())) {
     899                    // result = left - right
     900                    // result + right = left
     901                    addAvailableRecovery(
     902                        m_node->child1(), AddRecovery,
     903                        m_out.extractValue(result, 0), right, ValueFormatInt52);
     904                }
     905            }
     906
    845907            speculate(Int52Overflow, noValue(), 0, m_out.extractValue(result, 1));
    846908            setInt52(m_out.extractValue(result, 0));
     
    40664128        ExitKind kind, FormattedValue lowValue, Node* highValue, LValue failCondition)
    40674129    {
    4068         if (verboseCompilationEnabled())
     4130        if (verboseCompilationEnabled()) {
    40694131            dataLog("    OSR exit #", m_ftlState.jitCode->osrExit.size(), " with availability: ", m_availability, "\n");
     4132            if (!m_availableRecoveries.isEmpty())
     4133                dataLog("        Available recoveries: ", listDump(m_availableRecoveries), "\n");
     4134        }
    40704135
    40714136        ASSERT(m_ftlState.jitCode->osrExit.size() == m_ftlState.finalizer->osrExit.size());
     
    41914256        if (tryToSetConstantExitArgument(exit, index, node))
    41924257            return;
     4258       
     4259        for (unsigned i = 0; i < m_availableRecoveries.size(); ++i) {
     4260            AvailableRecovery recovery = m_availableRecoveries[i];
     4261            if (recovery.node() != node)
     4262                continue;
     4263           
     4264            exit.m_values[index] = ExitValue::recovery(
     4265                recovery.opcode(), arguments.size(), arguments.size() + 1,
     4266                recovery.format());
     4267            arguments.append(recovery.left());
     4268            arguments.append(recovery.right());
     4269            return;
     4270        }
    41934271       
    41944272        LoweredNodeValue value = m_int32Values.get(node);
     
    42614339    }
    42624340   
     4341    bool doesKill(Edge edge)
     4342    {
     4343        if (edge.doesNotKill())
     4344            return false;
     4345       
     4346        if (edge->hasConstant())
     4347            return false;
     4348       
     4349        return true;
     4350    }
     4351   
     4352    void addAvailableRecovery(
     4353        Node* node, RecoveryOpcode opcode, LValue left, LValue right, ValueFormat format)
     4354    {
     4355        m_availableRecoveries.append(AvailableRecovery(node, opcode, left, right, format));
     4356    }
     4357   
     4358    void addAvailableRecovery(
     4359        Edge edge, RecoveryOpcode opcode, LValue left, LValue right, ValueFormat format)
     4360    {
     4361        addAvailableRecovery(edge.node(), opcode, left, right, format);
     4362    }
     4363   
    42634364    void setInt32(Node* node, LValue value)
    42644365    {
     
    44244525    Operands<Availability> m_availability;
    44254526   
     4527    Vector<AvailableRecovery, 3> m_availableRecoveries;
     4528   
    44264529    InPlaceAbstractState m_state;
    44274530    AbstractInterpreter<InPlaceAbstractState> m_interpreter;
  • branches/jsCStack/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp

    r161445 r161543  
    11/*
    2  * Copyright (C) 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    135135            break;
    136136           
     137        case ExitValueRecovery:
     138            record->locations[value.rightRecoveryArgument()].restoreInto(
     139                jit, jitCode->stackmaps, registerScratch, GPRInfo::regT1);
     140            record->locations[value.leftRecoveryArgument()].restoreInto(
     141                jit, jitCode->stackmaps, registerScratch, GPRInfo::regT0);
     142            switch (value.recoveryOpcode()) {
     143            case AddRecovery:
     144                switch (value.recoveryFormat()) {
     145                case ValueFormatInt32:
     146                    jit.add32(GPRInfo::regT1, GPRInfo::regT0);
     147                    break;
     148                case ValueFormatInt52:
     149                    jit.add64(GPRInfo::regT1, GPRInfo::regT0);
     150                    break;
     151                default:
     152                    RELEASE_ASSERT_NOT_REACHED();
     153                    break;
     154                }
     155                break;
     156            case SubRecovery:
     157                switch (value.recoveryFormat()) {
     158                case ValueFormatInt32:
     159                    jit.sub32(GPRInfo::regT1, GPRInfo::regT0);
     160                    break;
     161                case ValueFormatInt52:
     162                    jit.sub64(GPRInfo::regT1, GPRInfo::regT0);
     163                    break;
     164                default:
     165                    RELEASE_ASSERT_NOT_REACHED();
     166                    break;
     167                }
     168                break;
     169            default:
     170                RELEASE_ASSERT_NOT_REACHED();
     171                break;
     172            }
     173            break;
     174           
    137175        default:
    138176            RELEASE_ASSERT_NOT_REACHED();
  • branches/jsCStack/Source/JavaScriptCore/ftl/FTLStackMaps.h

    r159448 r161543  
    6262        int8_t size;
    6363        Kind kind;
    64         int16_t offset;
     64        int32_t offset;
    6565       
    6666        void parse(DataView*, unsigned& offset);
Note: See TracChangeset for help on using the changeset viewer.