- Source/JavaScriptCore/ChangeLog +33 lines
Lines 1-3 Source/JavaScriptCore/ChangeLog_sec1
1
2014-01-20  Filip Pizlo  <fpizlo@apple.com>
2
3
        IC status classes should directly query exit site information
4
        https://bugs.webkit.org/show_bug.cgi?id=127326
5
6
        Reviewed by NOBODY (OOPS!).
7
        
8
        This consolidates all of the reasoning about whether or not to inline an IC at the IR level.
9
10
        * bytecode/CallLinkStatus.cpp:
11
        (JSC::CallLinkStatus::computeFromLLInt):
12
        (JSC::CallLinkStatus::computeFor):
13
        * bytecode/CallLinkStatus.h:
14
        * bytecode/CodeBlock.h:
15
        (JSC::CodeBlock::hasExitSite):
16
        * bytecode/GetByIdStatus.cpp:
17
        (JSC::GetByIdStatus::hasExitSite):
18
        (JSC::GetByIdStatus::computeFor):
19
        * bytecode/GetByIdStatus.h:
20
        * bytecode/PutByIdStatus.cpp:
21
        (JSC::PutByIdStatus::hasExitSite):
22
        (JSC::PutByIdStatus::computeFor):
23
        * bytecode/PutByIdStatus.h:
24
        * bytecode/StructureSet.h:
25
        (JSC::StructureSet::StructureSet):
26
        (JSC::StructureSet::add):
27
        * dfg/DFGByteCodeParser.cpp:
28
        (JSC::DFG::ByteCodeParser::handleCall):
29
        (JSC::DFG::ByteCodeParser::handleGetById):
30
        (JSC::DFG::ByteCodeParser::parseBlock):
31
        * dfg/DFGValidate.cpp:
32
        (JSC::DFG::Validate::validate):
33
1
2014-01-20  Matthew Mirman  <mmirman@apple.com>
34
2014-01-20  Matthew Mirman  <mmirman@apple.com>
2
35
3
        ArithSqrt in FTL
36
        ArithSqrt in FTL
- Source/JavaScriptCore/bytecode/CallLinkStatus.cpp -6 / +18 lines
Lines 1-5 Source/JavaScriptCore/bytecode/CallLinkStatus.cpp_sec1
1
/*
1
/*
2
 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
2
 * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
3
 *
3
 *
4
 * Redistribution and use in source and binary forms, with or without
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
5
 * modification, are permitted provided that the following conditions
Lines 81-91 Intrinsic CallLinkStatus::intrinsicFor(C Source/JavaScriptCore/bytecode/CallLinkStatus.cpp_sec2
81
    return m_executable->intrinsicFor(kind);
81
    return m_executable->intrinsicFor(kind);
82
}
82
}
83
83
84
CallLinkStatus CallLinkStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex)
84
CallLinkStatus CallLinkStatus::computeFromLLInt(const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex)
85
{
85
{
86
    UNUSED_PARAM(profiledBlock);
86
    UNUSED_PARAM(profiledBlock);
87
    UNUSED_PARAM(bytecodeIndex);
87
    UNUSED_PARAM(bytecodeIndex);
88
#if ENABLE(LLINT)
88
#if ENABLE(LLINT)
89
    if (profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadFunction))) {
90
        // We could force this to be a closure call, but instead we'll just assume that it
91
        // takes slow path.
92
        return takesSlowPath();
93
    }
94
    
89
    Instruction* instruction = profiledBlock->instructions().begin() + bytecodeIndex;
95
    Instruction* instruction = profiledBlock->instructions().begin() + bytecodeIndex;
90
    LLIntCallLinkInfo* callLinkInfo = instruction[5].u.callLinkInfo;
96
    LLIntCallLinkInfo* callLinkInfo = instruction[5].u.callLinkInfo;
91
    
97
    
Lines 102-112 CallLinkStatus CallLinkStatus::computeFo Source/JavaScriptCore/bytecode/CallLinkStatus.cpp_sec3
102
    UNUSED_PARAM(profiledBlock);
108
    UNUSED_PARAM(profiledBlock);
103
    UNUSED_PARAM(bytecodeIndex);
109
    UNUSED_PARAM(bytecodeIndex);
104
#if ENABLE(JIT)
110
#if ENABLE(JIT)
111
    if (profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache))
112
        || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCacheWatchpoint))
113
        || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadExecutable)))
114
        return takesSlowPath();
115
    
105
    if (!profiledBlock->hasBaselineJITProfiling())
116
    if (!profiledBlock->hasBaselineJITProfiling())
106
        return computeFromLLInt(profiledBlock, bytecodeIndex);
117
        return computeFromLLInt(locker, profiledBlock, bytecodeIndex);
107
    
118
    
108
    if (profiledBlock->couldTakeSlowCase(bytecodeIndex))
119
    if (profiledBlock->couldTakeSlowCase(bytecodeIndex))
109
        return CallLinkStatus::takesSlowPath();
120
        return takesSlowPath();
110
    
121
    
111
    CallLinkInfo& callLinkInfo = profiledBlock->getCallLinkInfo(bytecodeIndex);
122
    CallLinkInfo& callLinkInfo = profiledBlock->getCallLinkInfo(bytecodeIndex);
112
    if (callLinkInfo.stub)
123
    if (callLinkInfo.stub)
Lines 114-122 CallLinkStatus CallLinkStatus::computeFo Source/JavaScriptCore/bytecode/CallLinkStatus.cpp_sec4
114
    
125
    
115
    JSFunction* target = callLinkInfo.lastSeenCallee.get();
126
    JSFunction* target = callLinkInfo.lastSeenCallee.get();
116
    if (!target)
127
    if (!target)
117
        return computeFromLLInt(profiledBlock, bytecodeIndex);
128
        return computeFromLLInt(locker, profiledBlock, bytecodeIndex);
118
    
129
    
119
    if (callLinkInfo.hasSeenClosure)
130
    if (callLinkInfo.hasSeenClosure
131
        || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadFunction)))
120
        return CallLinkStatus(target->executable(), target->structure());
132
        return CallLinkStatus(target->executable(), target->structure());
121
133
122
    return CallLinkStatus(target);
134
    return CallLinkStatus(target);
- Source/JavaScriptCore/bytecode/CallLinkStatus.h -28 / +3 lines
Lines 1-5 Source/JavaScriptCore/bytecode/CallLinkStatus.h_sec1
1
/*
1
/*
2
 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
2
 * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
3
 *
3
 *
4
 * Redistribution and use in source and binary forms, with or without
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
5
 * modification, are permitted provided that the following conditions
Lines 27-32 Source/JavaScriptCore/bytecode/CallLinkStatus.h_sec2
27
#define CallLinkStatus_h
27
#define CallLinkStatus_h
28
28
29
#include "CodeSpecializationKind.h"
29
#include "CodeSpecializationKind.h"
30
#include "ConcurrentJITLock.h"
30
#include "Intrinsic.h"
31
#include "Intrinsic.h"
31
#include "JSCJSValue.h"
32
#include "JSCJSValue.h"
32
33
Lines 74-105 public: Source/JavaScriptCore/bytecode/CallLinkStatus.h_sec3
74
    
75
    
75
    static CallLinkStatus computeFor(CodeBlock*, unsigned bytecodeIndex);
76
    static CallLinkStatus computeFor(CodeBlock*, unsigned bytecodeIndex);
76
    
77
    
77
    CallLinkStatus& setHasBadFunctionExitSite(bool didHaveExitSite)
78
    {
79
        ASSERT(!m_isProved);
80
        if (didHaveExitSite) {
81
            // Turn this into a closure call.
82
            m_callTarget = JSValue();
83
        }
84
        return *this;
85
    }
86
    
87
    CallLinkStatus& setHasBadCacheExitSite(bool didHaveExitSite)
88
    {
89
        ASSERT(!m_isProved);
90
        if (didHaveExitSite)
91
            *this = takesSlowPath();
92
        return *this;
93
    }
94
    
95
    CallLinkStatus& setHasBadExecutableExitSite(bool didHaveExitSite)
96
    {
97
        ASSERT(!m_isProved);
98
        if (didHaveExitSite)
99
            *this = takesSlowPath();
100
        return *this;
101
    }
102
    
103
    bool isSet() const { return m_callTarget || m_executable || m_couldTakeSlowPath; }
78
    bool isSet() const { return m_callTarget || m_executable || m_couldTakeSlowPath; }
104
    
79
    
105
    bool operator!() const { return !isSet(); }
80
    bool operator!() const { return !isSet(); }
Lines 119-125 public: Source/JavaScriptCore/bytecode/CallLinkStatus.h_sec4
119
    void dump(PrintStream&) const;
94
    void dump(PrintStream&) const;
120
    
95
    
121
private:
96
private:
122
    static CallLinkStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex);
97
    static CallLinkStatus computeFromLLInt(const ConcurrentJITLocker&, CodeBlock*, unsigned bytecodeIndex);
123
    
98
    
124
    JSValue m_callTarget;
99
    JSValue m_callTarget;
125
    ExecutableBase* m_executable;
100
    ExecutableBase* m_executable;
- Source/JavaScriptCore/bytecode/CodeBlock.h -2 / +6 lines
Lines 592-602 public: Source/JavaScriptCore/bytecode/CodeBlock.h_sec1
592
        ConcurrentJITLocker locker(m_lock);
592
        ConcurrentJITLocker locker(m_lock);
593
        return m_exitProfile.add(locker, site);
593
        return m_exitProfile.add(locker, site);
594
    }
594
    }
595
        
595
     
596
    bool hasExitSite(const ConcurrentJITLocker& locker, const DFG::FrequentExitSite& site) const
597
    {
598
        return m_exitProfile.hasExitSite(locker, site);
599
    }
596
    bool hasExitSite(const DFG::FrequentExitSite& site) const
600
    bool hasExitSite(const DFG::FrequentExitSite& site) const
597
    {
601
    {
598
        ConcurrentJITLocker locker(m_lock);
602
        ConcurrentJITLocker locker(m_lock);
599
        return m_exitProfile.hasExitSite(locker, site);
603
        return hasExitSite(locker, site);
600
    }
604
    }
601
605
602
    DFG::ExitProfile& exitProfile() { return m_exitProfile; }
606
    DFG::ExitProfile& exitProfile() { return m_exitProfile; }
- Source/JavaScriptCore/bytecode/GetByIdStatus.cpp -3 / +16 lines
Lines 1-5 Source/JavaScriptCore/bytecode/GetByIdStatus.cpp_sec1
1
/*
1
/*
2
 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
2
 * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
3
 *
3
 *
4
 * Redistribution and use in source and binary forms, with or without
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
5
 * modification, are permitted provided that the following conditions
Lines 34-39 Source/JavaScriptCore/bytecode/GetByIdStatus.cpp_sec2
34
34
35
namespace JSC {
35
namespace JSC {
36
36
37
bool GetByIdStatus::hasExitSite(const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex)
38
{
39
    return profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache))
40
        || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCacheWatchpoint))
41
        || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadWeakConstantCache))
42
        || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadWeakConstantCacheWatchpoint));
43
}
44
37
GetByIdStatus GetByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, StringImpl* uid)
45
GetByIdStatus GetByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, StringImpl* uid)
38
{
46
{
39
    UNUSED_PARAM(profiledBlock);
47
    UNUSED_PARAM(profiledBlock);
Lines 114-121 GetByIdStatus GetByIdStatus::computeFor( Source/JavaScriptCore/bytecode/GetByIdStatus.cpp_sec3
114
    UNUSED_PARAM(uid);
122
    UNUSED_PARAM(uid);
115
#if ENABLE(JIT)
123
#if ENABLE(JIT)
116
    StructureStubInfo* stubInfo = map.get(CodeOrigin(bytecodeIndex));
124
    StructureStubInfo* stubInfo = map.get(CodeOrigin(bytecodeIndex));
117
    if (!stubInfo || !stubInfo->seen)
125
    if (!stubInfo || !stubInfo->seen) {
126
        if (hasExitSite(locker, profiledBlock, bytecodeIndex))
127
            return GetByIdStatus(TakesSlowPath, true);
128
    
118
        return computeFromLLInt(profiledBlock, bytecodeIndex, uid);
129
        return computeFromLLInt(profiledBlock, bytecodeIndex, uid);
130
    }
119
    
131
    
120
    if (stubInfo->resetByGC)
132
    if (stubInfo->resetByGC)
121
        return GetByIdStatus(TakesSlowPath, true);
133
        return GetByIdStatus(TakesSlowPath, true);
Lines 142-148 GetByIdStatus GetByIdStatus::computeFor( Source/JavaScriptCore/bytecode/GetByIdStatus.cpp_sec4
142
    }
154
    }
143
    
155
    
144
    // Next check if it takes slow case, in which case we want to be kind of careful.
156
    // Next check if it takes slow case, in which case we want to be kind of careful.
145
    if (profiledBlock->likelyToTakeSlowCase(bytecodeIndex))
157
    if (profiledBlock->likelyToTakeSlowCase(bytecodeIndex)
158
        || hasExitSite(locker, profiledBlock, bytecodeIndex))
146
        return GetByIdStatus(TakesSlowPath, true);
159
        return GetByIdStatus(TakesSlowPath, true);
147
    
160
    
148
    // Finally figure out if we can derive an access strategy.
161
    // Finally figure out if we can derive an access strategy.
- Source/JavaScriptCore/bytecode/GetByIdStatus.h -1 / +3 lines
Lines 1-5 Source/JavaScriptCore/bytecode/GetByIdStatus.h_sec1
1
/*
1
/*
2
 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
2
 * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
3
 *
3
 *
4
 * Redistribution and use in source and binary forms, with or without
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
5
 * modification, are permitted provided that the following conditions
Lines 26-31 Source/JavaScriptCore/bytecode/GetByIdStatus.h_sec2
26
#ifndef GetByIdStatus_h
26
#ifndef GetByIdStatus_h
27
#define GetByIdStatus_h
27
#define GetByIdStatus_h
28
28
29
#include "ConcurrentJITLock.h"
29
#include "IntendedStructureChain.h"
30
#include "IntendedStructureChain.h"
30
#include "PropertyOffset.h"
31
#include "PropertyOffset.h"
31
#include "StructureSet.h"
32
#include "StructureSet.h"
Lines 90-95 public: Source/JavaScriptCore/bytecode/GetByIdStatus.h_sec3
90
    bool wasSeenInJIT() const { return m_wasSeenInJIT; }
91
    bool wasSeenInJIT() const { return m_wasSeenInJIT; }
91
    
92
    
92
private:
93
private:
94
    static bool hasExitSite(const ConcurrentJITLocker&, CodeBlock*, unsigned bytecodeIndex);
93
    static void computeForChain(GetByIdStatus& result, CodeBlock*, StringImpl* uid);
95
    static void computeForChain(GetByIdStatus& result, CodeBlock*, StringImpl* uid);
94
    static GetByIdStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex, StringImpl* uid);
96
    static GetByIdStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex, StringImpl* uid);
95
    
97
    
- Source/JavaScriptCore/bytecode/PutByIdStatus.cpp -2 / +11 lines
Lines 1-5 Source/JavaScriptCore/bytecode/PutByIdStatus.cpp_sec1
1
/*
1
/*
2
 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
2
 * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
3
 *
3
 *
4
 * Redistribution and use in source and binary forms, with or without
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
5
 * modification, are permitted provided that the following conditions
Lines 35-40 Source/JavaScriptCore/bytecode/PutByIdStatus.cpp_sec2
35
35
36
namespace JSC {
36
namespace JSC {
37
37
38
bool PutByIdStatus::hasExitSite(const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex)
39
{
40
    return profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache))
41
        || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCacheWatchpoint))
42
        || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadWeakConstantCache))
43
        || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadWeakConstantCacheWatchpoint));
44
}
45
38
PutByIdStatus PutByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, StringImpl* uid)
46
PutByIdStatus PutByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, StringImpl* uid)
39
{
47
{
40
    UNUSED_PARAM(profiledBlock);
48
    UNUSED_PARAM(profiledBlock);
Lines 89-95 PutByIdStatus PutByIdStatus::computeFor( Source/JavaScriptCore/bytecode/PutByIdStatus.cpp_sec3
89
    UNUSED_PARAM(bytecodeIndex);
97
    UNUSED_PARAM(bytecodeIndex);
90
    UNUSED_PARAM(uid);
98
    UNUSED_PARAM(uid);
91
#if ENABLE(JIT)
99
#if ENABLE(JIT)
92
    if (profiledBlock->likelyToTakeSlowCase(bytecodeIndex))
100
    if (profiledBlock->likelyToTakeSlowCase(bytecodeIndex)
101
        || hasExitSite(locker, profiledBlock, bytecodeIndex))
93
        return PutByIdStatus(TakesSlowPath, 0, 0, 0, invalidOffset);
102
        return PutByIdStatus(TakesSlowPath, 0, 0, 0, invalidOffset);
94
    
103
    
95
    StructureStubInfo* stubInfo = map.get(CodeOrigin(bytecodeIndex));
104
    StructureStubInfo* stubInfo = map.get(CodeOrigin(bytecodeIndex));
- Source/JavaScriptCore/bytecode/PutByIdStatus.h +1 lines
Lines 108-113 public: Source/JavaScriptCore/bytecode/PutByIdStatus.h_sec1
108
    PropertyOffset offset() const { return m_offset; }
108
    PropertyOffset offset() const { return m_offset; }
109
    
109
    
110
private:
110
private:
111
    static bool hasExitSite(const ConcurrentJITLocker&, CodeBlock*, unsigned bytecodeIndex);
111
    static PutByIdStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex, StringImpl* uid);
112
    static PutByIdStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex, StringImpl* uid);
112
    
113
    
113
    State m_state;
114
    State m_state;
- Source/JavaScriptCore/bytecode/StructureSet.h +2 lines
Lines 45-50 public: Source/JavaScriptCore/bytecode/StructureSet.h_sec1
45
    
45
    
46
    StructureSet(Structure* structure)
46
    StructureSet(Structure* structure)
47
    {
47
    {
48
        ASSERT(structure);
48
        m_structures.append(structure);
49
        m_structures.append(structure);
49
    }
50
    }
50
    
51
    
Lines 55-60 public: Source/JavaScriptCore/bytecode/StructureSet.h_sec2
55
    
56
    
56
    void add(Structure* structure)
57
    void add(Structure* structure)
57
    {
58
    {
59
        ASSERT(structure);
58
        ASSERT(!contains(structure));
60
        ASSERT(!contains(structure));
59
        m_structures.append(structure);
61
        m_structures.append(structure);
60
    }
62
    }
- Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp -22 / +5 lines
Lines 1-5 Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp_sec1
1
/*
1
/*
2
 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
2
 * Copyright (C) 2011, 2012, 2013, 2014 Apple Inc. All rights reserved.
3
 *
3
 *
4
 * Redistribution and use in source and binary forms, with or without
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
5
 * modification, are permitted provided that the following conditions
Lines 1158-1171 void ByteCodeParser::handleCall(Instruct Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp_sec2
1158
1158
1159
    if (m_graph.isConstant(callTarget))
1159
    if (m_graph.isConstant(callTarget))
1160
        callLinkStatus = CallLinkStatus(m_graph.valueOfJSConstant(callTarget)).setIsProved(true);
1160
        callLinkStatus = CallLinkStatus(m_graph.valueOfJSConstant(callTarget)).setIsProved(true);
1161
    else {
1161
    else
1162
        callLinkStatus = CallLinkStatus::computeFor(m_inlineStackTop->m_profiledBlock, m_currentIndex);
1162
        callLinkStatus = CallLinkStatus::computeFor(m_inlineStackTop->m_profiledBlock, m_currentIndex);
1163
        callLinkStatus.setHasBadFunctionExitSite(m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadFunction));
1164
        callLinkStatus.setHasBadCacheExitSite(
1165
            m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCache)
1166
            || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCacheWatchpoint));
1167
        callLinkStatus.setHasBadExecutableExitSite(m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadExecutable));
1168
    }
1169
    
1163
    
1170
    if (!callLinkStatus.canOptimize()) {
1164
    if (!callLinkStatus.canOptimize()) {
1171
        // Oddly, this conflates calls that haven't executed with calls that behaved sufficiently polymorphically
1165
        // Oddly, this conflates calls that haven't executed with calls that behaved sufficiently polymorphically
Lines 1775-1785 void ByteCodeParser::handleGetById( Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp_sec3
1775
    int destinationOperand, SpeculatedType prediction, Node* base, unsigned identifierNumber,
1769
    int destinationOperand, SpeculatedType prediction, Node* base, unsigned identifierNumber,
1776
    const GetByIdStatus& getByIdStatus)
1770
    const GetByIdStatus& getByIdStatus)
1777
{
1771
{
1778
    if (!getByIdStatus.isSimple()
1772
    if (!getByIdStatus.isSimple()) {
1779
        || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCache)
1780
        || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCacheWatchpoint)
1781
        || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadWeakConstantCache)
1782
        || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadWeakConstantCacheWatchpoint)) {
1783
        set(VirtualRegister(destinationOperand),
1773
        set(VirtualRegister(destinationOperand),
1784
            addToGraph(
1774
            addToGraph(
1785
                getByIdStatus.makesCalls() ? GetByIdFlush : GetById,
1775
                getByIdStatus.makesCalls() ? GetByIdFlush : GetById,
Lines 2481-2498 bool ByteCodeParser::parseBlock(unsigned Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp_sec4
2481
                canCountAsInlined = false;
2471
                canCountAsInlined = false;
2482
            }
2472
            }
2483
            
2473
            
2484
            bool hasExitSite =
2474
            if (putByIdStatus.isSimpleReplace()) {
2485
                m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCache)
2486
                || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCacheWatchpoint)
2487
                || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadWeakConstantCache)
2488
                || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadWeakConstantCacheWatchpoint);
2489
            
2490
            if (!hasExitSite && putByIdStatus.isSimpleReplace()) {
2491
                addToGraph(CheckStructure, OpInfo(m_graph.addStructureSet(putByIdStatus.oldStructure())), base);
2475
                addToGraph(CheckStructure, OpInfo(m_graph.addStructureSet(putByIdStatus.oldStructure())), base);
2492
                handlePutByOffset(base, identifierNumber, putByIdStatus.offset(), value);
2476
                handlePutByOffset(base, identifierNumber, putByIdStatus.offset(), value);
2493
            } else if (
2477
            } else if (
2494
                !hasExitSite
2478
                putByIdStatus.isSimpleTransition()
2495
                && putByIdStatus.isSimpleTransition()
2496
                && (!putByIdStatus.structureChain()
2479
                && (!putByIdStatus.structureChain()
2497
                    || putByIdStatus.structureChain()->isStillValid())) {
2480
                    || putByIdStatus.structureChain()->isStillValid())) {
2498
                
2481
                
- Source/JavaScriptCore/dfg/DFGValidate.cpp +7 lines
Lines 187-192 public: Source/JavaScriptCore/dfg/DFGValidate.cpp_sec1
187
                Node* node = block->at(i);
187
                Node* node = block->at(i);
188
                VALIDATE((node), !node->isTerminal());
188
                VALIDATE((node), !node->isTerminal());
189
            }
189
            }
190
            
191
            for (size_t i = 0; i < block->size(); ++i) {
192
                Node* node = block->at(i);
193
                
194
                if (node->hasStructure())
195
                    VALIDATE((node), !!node->structure());
196
            }
190
        }
197
        }
191
        
198
        
192
        switch (m_graph.m_form) {
199
        switch (m_graph.m_form) {

Return to Bug 127326