Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: src/code-stub-assembler.cc

Issue 2231053002: MIPS64: Fix [KeyedLoadIC] Support Smi "handlers" for element loads (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address code review remarks Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-stub-assembler.h" 5 #include "src/code-stub-assembler.h"
6 #include "src/code-factory.h" 6 #include "src/code-factory.h"
7 #include "src/frames-inl.h" 7 #include "src/frames-inl.h"
8 #include "src/frames.h" 8 #include "src/frames.h"
9 #include "src/ic/handler-configuration.h" 9 #include "src/ic/handler-configuration.h"
10 #include "src/ic/stub-cache.h" 10 #include "src/ic/stub-cache.h"
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 Goto(&if_join); 1816 Goto(&if_join);
1817 Bind(&if_join); 1817 Bind(&if_join);
1818 return var_result.value(); 1818 return var_result.value();
1819 } 1819 }
1820 1820
1821 Node* CodeStubAssembler::ChangeUint32ToTagged(Node* value) { 1821 Node* CodeStubAssembler::ChangeUint32ToTagged(Node* value) {
1822 Label if_overflow(this, Label::kDeferred), if_not_overflow(this), 1822 Label if_overflow(this, Label::kDeferred), if_not_overflow(this),
1823 if_join(this); 1823 if_join(this);
1824 Variable var_result(this, MachineRepresentation::kTagged); 1824 Variable var_result(this, MachineRepresentation::kTagged);
1825 // If {value} > 2^31 - 1, we need to store it in a HeapNumber. 1825 // If {value} > 2^31 - 1, we need to store it in a HeapNumber.
1826 Branch(Int32LessThan(value, Int32Constant(0)), &if_overflow, 1826 Branch(Uint32LessThan(Int32Constant(Smi::kMaxValue), value), &if_overflow,
1827 &if_not_overflow); 1827 &if_not_overflow);
1828
1828 Bind(&if_not_overflow); 1829 Bind(&if_not_overflow);
1829 { 1830 {
1830 if (Is64()) { 1831 if (Is64()) {
1831 var_result.Bind(SmiTag(ChangeUint32ToUint64(value))); 1832 var_result.Bind(SmiTag(ChangeUint32ToUint64(value)));
1832 } else { 1833 } else {
1833 // If tagging {value} results in an overflow, we need to use a HeapNumber 1834 // If tagging {value} results in an overflow, we need to use a HeapNumber
1834 // to represent it. 1835 // to represent it.
1835 Node* pair = Int32AddWithOverflow(value, value); 1836 Node* pair = Int32AddWithOverflow(value, value);
1836 Node* overflow = Projection(1, pair); 1837 Node* overflow = Projection(1, pair);
1837 GotoIf(overflow, &if_overflow); 1838 GotoIf(overflow, &if_overflow);
(...skipping 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after
3978 Heap::kTheHoleValueRootIndex); 3979 Heap::kTheHoleValueRootIndex);
3979 3980
3980 // Store the WeakCell in the feedback vector. 3981 // Store the WeakCell in the feedback vector.
3981 StoreFixedArrayElement(feedback_vector, slot, cell, UPDATE_WRITE_BARRIER, 3982 StoreFixedArrayElement(feedback_vector, slot, cell, UPDATE_WRITE_BARRIER,
3982 CodeStubAssembler::SMI_PARAMETERS); 3983 CodeStubAssembler::SMI_PARAMETERS);
3983 return cell; 3984 return cell;
3984 } 3985 }
3985 3986
3986 } // namespace internal 3987 } // namespace internal
3987 } // namespace v8 3988 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698