| Differences between
and this patch
- a/Source/JavaScriptCore/ChangeLog +20 lines
Lines 1-3 a/Source/JavaScriptCore/ChangeLog_sec1
1
2018-03-10  Yusuke Suzuki  <utatane.tea@gmail.com>
2
3
        [B3] Above/Below should be strength-reduced for comparison with 0
4
        https://bugs.webkit.org/show_bug.cgi?id=183543
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Above(0, x) and BelowEqual(0, x) can be converted to constants false and true respectively.
9
        This can be seen in ArraySlice(0) case: `Select(Above(0, length), length, 0)` this should
10
        be converted to `0`.
11
12
        This change is already coverted by testb3's compare tests.
13
14
        * b3/B3Const32Value.cpp:
15
        (JSC::B3::Const32Value::aboveConstant const):
16
        (JSC::B3::Const32Value::belowEqualConstant const):
17
        * b3/B3Const64Value.cpp:
18
        (JSC::B3::Const64Value::aboveConstant const):
19
        (JSC::B3::Const64Value::belowEqualConstant const):
20
1
2018-03-09  Brian Burg  <bburg@apple.com>
21
2018-03-09  Brian Burg  <bburg@apple.com>
2
22
3
        Web Inspector: there should only be one way for async backend commands to send failure
23
        Web Inspector: there should only be one way for async backend commands to send failure
- a/Source/JavaScriptCore/b3/B3Const32Value.cpp +4 lines
Lines 248-253 TriState Const32Value::greaterEqualConstant(const Value* other) const a/Source/JavaScriptCore/b3/B3Const32Value.cpp_sec1
248
248
249
TriState Const32Value::aboveConstant(const Value* other) const
249
TriState Const32Value::aboveConstant(const Value* other) const
250
{
250
{
251
    if (static_cast<uint32_t>(m_value) == 0)
252
        return FalseTriState;
251
    if (!other->hasInt32())
253
    if (!other->hasInt32())
252
        return MixedTriState;
254
        return MixedTriState;
253
    return triState(static_cast<uint32_t>(m_value) > static_cast<uint32_t>(other->asInt32()));
255
    return triState(static_cast<uint32_t>(m_value) > static_cast<uint32_t>(other->asInt32()));
Lines 269-274 TriState Const32Value::aboveEqualConstant(const Value* other) const a/Source/JavaScriptCore/b3/B3Const32Value.cpp_sec2
269
271
270
TriState Const32Value::belowEqualConstant(const Value* other) const
272
TriState Const32Value::belowEqualConstant(const Value* other) const
271
{
273
{
274
    if (static_cast<uint32_t>(m_value) == 0)
275
        return TrueTriState;
272
    if (!other->hasInt32())
276
    if (!other->hasInt32())
273
        return MixedTriState;
277
        return MixedTriState;
274
    return triState(static_cast<uint32_t>(m_value) <= static_cast<uint32_t>(other->asInt32()));
278
    return triState(static_cast<uint32_t>(m_value) <= static_cast<uint32_t>(other->asInt32()));
- a/Source/JavaScriptCore/b3/B3Const64Value.cpp +4 lines
Lines 248-253 TriState Const64Value::greaterEqualConstant(const Value* other) const a/Source/JavaScriptCore/b3/B3Const64Value.cpp_sec1
248
248
249
TriState Const64Value::aboveConstant(const Value* other) const
249
TriState Const64Value::aboveConstant(const Value* other) const
250
{
250
{
251
    if (static_cast<uint64_t>(m_value) == 0)
252
        return FalseTriState;
251
    if (!other->hasInt64())
253
    if (!other->hasInt64())
252
        return MixedTriState;
254
        return MixedTriState;
253
    return triState(static_cast<uint64_t>(m_value) > static_cast<uint64_t>(other->asInt64()));
255
    return triState(static_cast<uint64_t>(m_value) > static_cast<uint64_t>(other->asInt64()));
Lines 269-274 TriState Const64Value::aboveEqualConstant(const Value* other) const a/Source/JavaScriptCore/b3/B3Const64Value.cpp_sec2
269
271
270
TriState Const64Value::belowEqualConstant(const Value* other) const
272
TriState Const64Value::belowEqualConstant(const Value* other) const
271
{
273
{
274
    if (static_cast<uint64_t>(m_value) == 0)
275
        return TrueTriState;
272
    if (!other->hasInt64())
276
    if (!other->hasInt64())
273
        return MixedTriState;
277
        return MixedTriState;
274
    return triState(static_cast<uint64_t>(m_value) <= static_cast<uint64_t>(other->asInt64()));
278
    return triState(static_cast<uint64_t>(m_value) <= static_cast<uint64_t>(other->asInt64()));

Return to Bug 183543