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

Side by Side Diff: src/compiler/representation-change.h

Issue 1314473007: [turbofan] Remove usage of Unique<T> from graph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased and fixed. Created 5 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
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/simplified-operator-reducer.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_REPRESENTATION_CHANGE_H_ 5 #ifndef V8_COMPILER_REPRESENTATION_CHANGE_H_
6 #define V8_COMPILER_REPRESENTATION_CHANGE_H_ 6 #define V8_COMPILER_REPRESENTATION_CHANGE_H_
7 7
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } else { 285 } else {
286 return TypeError(node, output_type, kRepWord32); 286 return TypeError(node, output_type, kRepWord32);
287 } 287 }
288 return jsgraph()->graph()->NewNode(op, node); 288 return jsgraph()->graph()->NewNode(op, node);
289 } 289 }
290 290
291 Node* GetBitRepresentationFor(Node* node, MachineTypeUnion output_type) { 291 Node* GetBitRepresentationFor(Node* node, MachineTypeUnion output_type) {
292 // Eagerly fold representation changes for constants. 292 // Eagerly fold representation changes for constants.
293 switch (node->opcode()) { 293 switch (node->opcode()) {
294 case IrOpcode::kHeapConstant: { 294 case IrOpcode::kHeapConstant: {
295 Handle<Object> value = OpParameter<Unique<Object> >(node).handle(); 295 Handle<HeapObject> value = OpParameter<Handle<HeapObject>>(node);
296 DCHECK(value.is_identical_to(factory()->true_value()) || 296 DCHECK(value.is_identical_to(factory()->true_value()) ||
297 value.is_identical_to(factory()->false_value())); 297 value.is_identical_to(factory()->false_value()));
298 return jsgraph()->Int32Constant( 298 return jsgraph()->Int32Constant(
299 value.is_identical_to(factory()->true_value()) ? 1 : 0); 299 value.is_identical_to(factory()->true_value()) ? 1 : 0);
300 } 300 }
301 default: 301 default:
302 break; 302 break;
303 } 303 }
304 // Select the correct X -> Bit operator. 304 // Select the correct X -> Bit operator.
305 const Operator* op; 305 const Operator* op;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 Factory* factory() const { return isolate()->factory(); } 453 Factory* factory() const { return isolate()->factory(); }
454 SimplifiedOperatorBuilder* simplified() { return simplified_; } 454 SimplifiedOperatorBuilder* simplified() { return simplified_; }
455 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } 455 MachineOperatorBuilder* machine() { return jsgraph()->machine(); }
456 }; 456 };
457 457
458 } // namespace compiler 458 } // namespace compiler
459 } // namespace internal 459 } // namespace internal
460 } // namespace v8 460 } // namespace v8
461 461
462 #endif // V8_COMPILER_REPRESENTATION_CHANGE_H_ 462 #endif // V8_COMPILER_REPRESENTATION_CHANGE_H_
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/simplified-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698