| 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 28 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 | 40 |
| 41 Node* CodeStubAssembler::NullConstant() { | 41 Node* CodeStubAssembler::NullConstant() { |
| 42 return LoadRoot(Heap::kNullValueRootIndex); | 42 return LoadRoot(Heap::kNullValueRootIndex); |
| 43 } | 43 } |
| 44 | 44 |
| 45 Node* CodeStubAssembler::UndefinedConstant() { | 45 Node* CodeStubAssembler::UndefinedConstant() { |
| 46 return LoadRoot(Heap::kUndefinedValueRootIndex); | 46 return LoadRoot(Heap::kUndefinedValueRootIndex); |
| 47 } | 47 } |
| 48 | 48 |
| 49 Node* CodeStubAssembler::StaleRegisterConstant() { |
| 50 return LoadRoot(Heap::kStaleRegisterRootIndex); |
| 51 } |
| 52 |
| 49 Node* CodeStubAssembler::Float64Round(Node* x) { | 53 Node* CodeStubAssembler::Float64Round(Node* x) { |
| 50 Node* one = Float64Constant(1.0); | 54 Node* one = Float64Constant(1.0); |
| 51 Node* one_half = Float64Constant(0.5); | 55 Node* one_half = Float64Constant(0.5); |
| 52 | 56 |
| 53 Variable var_x(this, MachineRepresentation::kFloat64); | 57 Variable var_x(this, MachineRepresentation::kFloat64); |
| 54 Label return_x(this); | 58 Label return_x(this); |
| 55 | 59 |
| 56 // Round up {x} towards Infinity. | 60 // Round up {x} towards Infinity. |
| 57 var_x.Bind(Float64Ceil(x)); | 61 var_x.Bind(Float64Ceil(x)); |
| 58 | 62 |
| (...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 } | 1139 } |
| 1136 | 1140 |
| 1137 Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift, | 1141 Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift, |
| 1138 uint32_t mask) { | 1142 uint32_t mask) { |
| 1139 return Word32Shr(Word32And(word32, Int32Constant(mask)), | 1143 return Word32Shr(Word32And(word32, Int32Constant(mask)), |
| 1140 Int32Constant(shift)); | 1144 Int32Constant(shift)); |
| 1141 } | 1145 } |
| 1142 | 1146 |
| 1143 } // namespace internal | 1147 } // namespace internal |
| 1144 } // namespace v8 | 1148 } // namespace v8 |
| OLD | NEW |