Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: src/compiler/ia32/instruction-selector-ia32.cc

Issue 1881913002: Revert of [compiler] Add relocatable pointer constants for wasm memory references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 break; 49 break;
50 } 50 }
51 return false; 51 return false;
52 } 52 }
53 53
54 bool CanBeImmediate(Node* node) { 54 bool CanBeImmediate(Node* node) {
55 switch (node->opcode()) { 55 switch (node->opcode()) {
56 case IrOpcode::kInt32Constant: 56 case IrOpcode::kInt32Constant:
57 case IrOpcode::kNumberConstant: 57 case IrOpcode::kNumberConstant:
58 case IrOpcode::kExternalConstant: 58 case IrOpcode::kExternalConstant:
59 case IrOpcode::kRelocatableInt32Constant:
60 case IrOpcode::kRelocatableInt64Constant:
61 return true; 59 return true;
62 case IrOpcode::kHeapConstant: { 60 case IrOpcode::kHeapConstant: {
63 // Constants in new space cannot be used as immediates in V8 because 61 // Constants in new space cannot be used as immediates in V8 because
64 // the GC does not scan code objects when collecting the new generation. 62 // the GC does not scan code objects when collecting the new generation.
65 Handle<HeapObject> value = OpParameter<Handle<HeapObject>>(node); 63 Handle<HeapObject> value = OpParameter<Handle<HeapObject>>(node);
66 Isolate* isolate = value->GetIsolate(); 64 Isolate* isolate = value->GetIsolate();
67 return !isolate->heap()->InNewSpace(*value); 65 return !isolate->heap()->InNewSpace(*value);
68 } 66 }
69 default: 67 default:
70 return false; 68 return false;
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 MachineOperatorBuilder::kFloat64RoundTruncate | 1586 MachineOperatorBuilder::kFloat64RoundTruncate |
1589 MachineOperatorBuilder::kFloat32RoundTiesEven | 1587 MachineOperatorBuilder::kFloat32RoundTiesEven |
1590 MachineOperatorBuilder::kFloat64RoundTiesEven; 1588 MachineOperatorBuilder::kFloat64RoundTiesEven;
1591 } 1589 }
1592 return flags; 1590 return flags;
1593 } 1591 }
1594 1592
1595 } // namespace compiler 1593 } // namespace compiler
1596 } // namespace internal 1594 } // namespace internal
1597 } // namespace v8 1595 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698