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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 bool CanBeImmediate(Node* node) { | 30 bool CanBeImmediate(Node* node) { |
31 switch (node->opcode()) { | 31 switch (node->opcode()) { |
32 case IrOpcode::kInt32Constant: | 32 case IrOpcode::kInt32Constant: |
33 case IrOpcode::kNumberConstant: | 33 case IrOpcode::kNumberConstant: |
34 case IrOpcode::kExternalConstant: | 34 case IrOpcode::kExternalConstant: |
35 return true; | 35 return true; |
36 case IrOpcode::kHeapConstant: { | 36 case IrOpcode::kHeapConstant: { |
37 // Constants in new space cannot be used as immediates in V8 because | 37 // Constants in new space cannot be used as immediates in V8 because |
38 // the GC does not scan code objects when collecting the new generation. | 38 // the GC does not scan code objects when collecting the new generation. |
39 Unique<HeapObject> value = OpParameter<Unique<HeapObject> >(node); | 39 Handle<HeapObject> value = OpParameter<Handle<HeapObject>>(node); |
40 Isolate* isolate = value.handle()->GetIsolate(); | 40 Isolate* isolate = value->GetIsolate(); |
41 return !isolate->heap()->InNewSpace(*value.handle()); | 41 return !isolate->heap()->InNewSpace(*value); |
42 } | 42 } |
43 default: | 43 default: |
44 return false; | 44 return false; |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 AddressingMode GenerateMemoryOperandInputs(Node* index, int scale, Node* base, | 48 AddressingMode GenerateMemoryOperandInputs(Node* index, int scale, Node* base, |
49 Node* displacement_node, | 49 Node* displacement_node, |
50 InstructionOperand inputs[], | 50 InstructionOperand inputs[], |
51 size_t* input_count) { | 51 size_t* input_count) { |
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 if (CpuFeatures::IsSupported(SSE4_1)) { | 1349 if (CpuFeatures::IsSupported(SSE4_1)) { |
1350 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1350 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
1351 MachineOperatorBuilder::kFloat64RoundTruncate; | 1351 MachineOperatorBuilder::kFloat64RoundTruncate; |
1352 } | 1352 } |
1353 return flags; | 1353 return flags; |
1354 } | 1354 } |
1355 | 1355 |
1356 } // namespace compiler | 1356 } // namespace compiler |
1357 } // namespace internal | 1357 } // namespace internal |
1358 } // namespace v8 | 1358 } // namespace v8 |
OLD | NEW |