| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/change-lowering.h" | 5 #include "src/compiler/change-lowering.h" |
| 6 | 6 |
| 7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 STATIC_ASSERT(HeapNumber::kValueOffset % kPointerSize == 0); | 46 STATIC_ASSERT(HeapNumber::kValueOffset % kPointerSize == 0); |
| 47 const int heap_number_value_offset = | 47 const int heap_number_value_offset = |
| 48 ((HeapNumber::kValueOffset / kPointerSize) * (machine()->Is64() ? 8 : 4)); | 48 ((HeapNumber::kValueOffset / kPointerSize) * (machine()->Is64() ? 8 : 4)); |
| 49 return jsgraph()->IntPtrConstant(heap_number_value_offset - kHeapObjectTag); | 49 return jsgraph()->IntPtrConstant(heap_number_value_offset - kHeapObjectTag); |
| 50 } | 50 } |
| 51 | 51 |
| 52 | 52 |
| 53 Node* ChangeLowering::SmiMaxValueConstant() { | 53 Node* ChangeLowering::SmiMaxValueConstant() { |
| 54 const int smi_value_size = machine()->Is32() ? SmiTagging<4>::SmiValueSize() | 54 const int smi_value_size = machine()->Is32() ? SmiTagging<4>::SmiValueSize() |
| 55 : SmiTagging<8>::SmiValueSize(); | 55 : SmiTagging<8>::SmiValueSize(); |
| 56 return jsgraph()->IntPtrConstant( | 56 return jsgraph()->Int32Constant( |
| 57 -(static_cast<int>(0xffffffffu << (smi_value_size - 1)) + 1)); | 57 -(static_cast<int>(0xffffffffu << (smi_value_size - 1)) + 1)); |
| 58 } | 58 } |
| 59 | 59 |
| 60 | 60 |
| 61 Node* ChangeLowering::SmiShiftBitsConstant() { | 61 Node* ChangeLowering::SmiShiftBitsConstant() { |
| 62 const int smi_shift_size = machine()->Is32() ? SmiTagging<4>::SmiShiftSize() | 62 const int smi_shift_size = machine()->Is32() ? SmiTagging<4>::SmiShiftSize() |
| 63 : SmiTagging<8>::SmiShiftSize(); | 63 : SmiTagging<8>::SmiShiftSize(); |
| 64 return jsgraph()->IntPtrConstant(smi_shift_size + kSmiTagSize); | 64 return jsgraph()->IntPtrConstant(smi_shift_size + kSmiTagSize); |
| 65 } | 65 } |
| 66 | 66 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 } | 250 } |
| 251 | 251 |
| 252 | 252 |
| 253 MachineOperatorBuilder* ChangeLowering::machine() const { | 253 MachineOperatorBuilder* ChangeLowering::machine() const { |
| 254 return jsgraph()->machine(); | 254 return jsgraph()->machine(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 } // namespace compiler | 257 } // namespace compiler |
| 258 } // namespace internal | 258 } // namespace internal |
| 259 } // namespace v8 | 259 } // namespace v8 |
| OLD | NEW |