OLD | NEW |
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 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 Node* CodeStubAssembler::SmiToWord32(Node* value) { | 253 Node* CodeStubAssembler::SmiToWord32(Node* value) { |
254 Node* result = WordSar(value, SmiShiftBitsConstant()); | 254 Node* result = WordSar(value, SmiShiftBitsConstant()); |
255 if (Is64()) { | 255 if (Is64()) { |
256 result = TruncateInt64ToInt32(result); | 256 result = TruncateInt64ToInt32(result); |
257 } | 257 } |
258 return result; | 258 return result; |
259 } | 259 } |
260 | 260 |
261 Node* CodeStubAssembler::SmiToFloat64(Node* value) { | 261 Node* CodeStubAssembler::SmiToFloat64(Node* value) { |
262 return ChangeInt32ToFloat64(SmiUntag(value)); | 262 return ChangeInt32ToFloat64(SmiToWord32(value)); |
263 } | 263 } |
264 | 264 |
265 Node* CodeStubAssembler::SmiAdd(Node* a, Node* b) { return IntPtrAdd(a, b); } | 265 Node* CodeStubAssembler::SmiAdd(Node* a, Node* b) { return IntPtrAdd(a, b); } |
266 | 266 |
267 Node* CodeStubAssembler::SmiAddWithOverflow(Node* a, Node* b) { | 267 Node* CodeStubAssembler::SmiAddWithOverflow(Node* a, Node* b) { |
268 return IntPtrAddWithOverflow(a, b); | 268 return IntPtrAddWithOverflow(a, b); |
269 } | 269 } |
270 | 270 |
271 Node* CodeStubAssembler::SmiSub(Node* a, Node* b) { return IntPtrSub(a, b); } | 271 Node* CodeStubAssembler::SmiSub(Node* a, Node* b) { return IntPtrSub(a, b); } |
272 | 272 |
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 | 1411 |
1412 Bind(&if_iskeyinrange); | 1412 Bind(&if_iskeyinrange); |
1413 Node* element = LoadFixedArrayElementInt32Index(elements, index); | 1413 Node* element = LoadFixedArrayElementInt32Index(elements, index); |
1414 Node* the_hole = LoadRoot(Heap::kTheHoleValueRootIndex); | 1414 Node* the_hole = LoadRoot(Heap::kTheHoleValueRootIndex); |
1415 Branch(WordEqual(element, the_hole), if_not_found, if_found); | 1415 Branch(WordEqual(element, the_hole), if_not_found, if_found); |
1416 } | 1416 } |
1417 } | 1417 } |
1418 | 1418 |
1419 } // namespace internal | 1419 } // namespace internal |
1420 } // namespace v8 | 1420 } // namespace v8 |
OLD | NEW |