| 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/base/adapters.h" | 5 #include "src/base/adapters.h" |
| 6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
| 7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 bool CanBeImmediate(Node* node) { | 34 bool CanBeImmediate(Node* node) { |
| 35 switch (node->opcode()) { | 35 switch (node->opcode()) { |
| 36 case IrOpcode::kInt32Constant: | 36 case IrOpcode::kInt32Constant: |
| 37 case IrOpcode::kNumberConstant: | 37 case IrOpcode::kNumberConstant: |
| 38 case IrOpcode::kExternalConstant: | 38 case IrOpcode::kExternalConstant: |
| 39 return true; | 39 return true; |
| 40 case IrOpcode::kHeapConstant: { | 40 case IrOpcode::kHeapConstant: { |
| 41 // Constants in new space cannot be used as immediates in V8 because | 41 // Constants in new space cannot be used as immediates in V8 because |
| 42 // the GC does not scan code objects when collecting the new generation. | 42 // the GC does not scan code objects when collecting the new generation. |
| 43 Unique<HeapObject> value = OpParameter<Unique<HeapObject> >(node); | 43 Handle<HeapObject> value = OpParameter<Handle<HeapObject>>(node); |
| 44 Isolate* isolate = value.handle()->GetIsolate(); | 44 Isolate* isolate = value->GetIsolate(); |
| 45 return !isolate->heap()->InNewSpace(*value.handle()); | 45 return !isolate->heap()->InNewSpace(*value); |
| 46 } | 46 } |
| 47 default: | 47 default: |
| 48 return false; | 48 return false; |
| 49 } | 49 } |
| 50 } | 50 } |
| 51 | 51 |
| 52 AddressingMode GenerateMemoryOperandInputs(Node* index, int scale, Node* base, | 52 AddressingMode GenerateMemoryOperandInputs(Node* index, int scale, Node* base, |
| 53 Node* displacement_node, | 53 Node* displacement_node, |
| 54 InstructionOperand inputs[], | 54 InstructionOperand inputs[], |
| 55 size_t* input_count) { | 55 size_t* input_count) { |
| (...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1351 MachineOperatorBuilder::kFloat32Min | | 1351 MachineOperatorBuilder::kFloat32Min | |
| 1352 MachineOperatorBuilder::kFloat64Max | | 1352 MachineOperatorBuilder::kFloat64Max | |
| 1353 MachineOperatorBuilder::kFloat64Min | | 1353 MachineOperatorBuilder::kFloat64Min | |
| 1354 MachineOperatorBuilder::kWord32ShiftIsSafe; | 1354 MachineOperatorBuilder::kWord32ShiftIsSafe; |
| 1355 return flags; | 1355 return flags; |
| 1356 } | 1356 } |
| 1357 | 1357 |
| 1358 } // namespace compiler | 1358 } // namespace compiler |
| 1359 } // namespace internal | 1359 } // namespace internal |
| 1360 } // namespace v8 | 1360 } // namespace v8 |
| OLD | NEW |