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

Side by Side Diff: src/compiler/raw-machine-assembler.h

Issue 547233003: [turbofan] Machine operators are globally shared singletons. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Next windows fix. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/raw-machine-assembler.cc » ('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 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 5 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
7 7
8 #ifdef USE_SIMULATOR 8 #ifdef USE_SIMULATOR
9 #define MACHINE_ASSEMBLER_SUPPORTS_CALL_C 0 9 #define MACHINE_ASSEMBLER_SUPPORTS_CALL_C 0
10 #else 10 #else
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 Node* Load(MachineType rep, Node* base) { 101 Node* Load(MachineType rep, Node* base) {
102 return Load(rep, base, Int32Constant(0)); 102 return Load(rep, base, Int32Constant(0));
103 } 103 }
104 Node* Load(MachineType rep, Node* base, Node* index) { 104 Node* Load(MachineType rep, Node* base, Node* index) {
105 return NewNode(machine()->Load(rep), base, index); 105 return NewNode(machine()->Load(rep), base, index);
106 } 106 }
107 void Store(MachineType rep, Node* base, Node* value) { 107 void Store(MachineType rep, Node* base, Node* value) {
108 Store(rep, base, Int32Constant(0), value); 108 Store(rep, base, Int32Constant(0), value);
109 } 109 }
110 void Store(MachineType rep, Node* base, Node* index, Node* value) { 110 void Store(MachineType rep, Node* base, Node* index, Node* value) {
111 NewNode(machine()->Store(rep, kNoWriteBarrier), base, index, value); 111 NewNode(machine()->Store(StoreRepresentation(rep, kNoWriteBarrier)), base,
112 index, value);
112 } 113 }
113 // Arithmetic Operations. 114 // Arithmetic Operations.
114 Node* WordAnd(Node* a, Node* b) { 115 Node* WordAnd(Node* a, Node* b) {
115 return NewNode(machine()->WordAnd(), a, b); 116 return NewNode(machine()->WordAnd(), a, b);
116 } 117 }
117 Node* WordOr(Node* a, Node* b) { return NewNode(machine()->WordOr(), a, b); } 118 Node* WordOr(Node* a, Node* b) { return NewNode(machine()->WordOr(), a, b); }
118 Node* WordXor(Node* a, Node* b) { 119 Node* WordXor(Node* a, Node* b) {
119 return NewNode(machine()->WordXor(), a, b); 120 return NewNode(machine()->WordXor(), a, b);
120 } 121 }
121 Node* WordShl(Node* a, Node* b) { 122 Node* WordShl(Node* a, Node* b) {
122 return NewNode(machine()->WordShl(), a, b); 123 return NewNode(machine()->WordShl(), a, b);
123 } 124 }
124 Node* WordShr(Node* a, Node* b) { 125 Node* WordShr(Node* a, Node* b) {
125 return NewNode(machine()->WordShr(), a, b); 126 return NewNode(machine()->WordShr(), a, b);
126 } 127 }
127 Node* WordSar(Node* a, Node* b) { 128 Node* WordSar(Node* a, Node* b) {
128 return NewNode(machine()->WordSar(), a, b); 129 return NewNode(machine()->WordSar(), a, b);
129 } 130 }
130 Node* WordRor(Node* a, Node* b) { 131 Node* WordRor(Node* a, Node* b) {
131 return NewNode(machine()->WordRor(), a, b); 132 return NewNode(machine()->WordRor(), a, b);
132 } 133 }
133 Node* WordEqual(Node* a, Node* b) { 134 Node* WordEqual(Node* a, Node* b) {
134 return NewNode(machine()->WordEqual(), a, b); 135 return NewNode(machine()->WordEqual(), a, b);
135 } 136 }
136 Node* WordNotEqual(Node* a, Node* b) { 137 Node* WordNotEqual(Node* a, Node* b) {
137 return WordBinaryNot(WordEqual(a, b)); 138 return WordBinaryNot(WordEqual(a, b));
138 } 139 }
139 Node* WordNot(Node* a) { 140 Node* WordNot(Node* a) {
140 if (machine()->is32()) { 141 if (machine()->Is32()) {
141 return Word32Not(a); 142 return Word32Not(a);
142 } else { 143 } else {
143 return Word64Not(a); 144 return Word64Not(a);
144 } 145 }
145 } 146 }
146 Node* WordBinaryNot(Node* a) { 147 Node* WordBinaryNot(Node* a) {
147 if (machine()->is32()) { 148 if (machine()->Is32()) {
148 return Word32BinaryNot(a); 149 return Word32BinaryNot(a);
149 } else { 150 } else {
150 return Word64BinaryNot(a); 151 return Word64BinaryNot(a);
151 } 152 }
152 } 153 }
153 154
154 Node* Word32And(Node* a, Node* b) { 155 Node* Word32And(Node* a, Node* b) {
155 return NewNode(machine()->Word32And(), a, b); 156 return NewNode(machine()->Word32And(), a, b);
156 } 157 }
157 Node* Word32Or(Node* a, Node* b) { 158 Node* Word32Or(Node* a, Node* b) {
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 BasicBlock* current_block_; 449 BasicBlock* current_block_;
449 450
450 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); 451 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler);
451 }; 452 };
452 453
453 } // namespace compiler 454 } // namespace compiler
454 } // namespace internal 455 } // namespace internal
455 } // namespace v8 456 } // namespace v8
456 457
457 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 458 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698