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

Side by Side Diff: src/compiler/instruction.h

Issue 1085623002: [turbofan] remove register operand cache (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « no previous file | src/compiler/register-allocator.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 #ifndef V8_COMPILER_INSTRUCTION_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_H_
6 #define V8_COMPILER_INSTRUCTION_H_ 6 #define V8_COMPILER_INSTRUCTION_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 bool Equals(const InstructionOperand* other) const { 56 bool Equals(const InstructionOperand* other) const {
57 return value_ == other->value_; 57 return value_ == other->value_;
58 } 58 }
59 59
60 // Useful for map/set keys. 60 // Useful for map/set keys.
61 bool operator<(const InstructionOperand& op) const { 61 bool operator<(const InstructionOperand& op) const {
62 return value_ < op.value_; 62 return value_ < op.value_;
63 } 63 }
64 64
65 bool operator==(const InstructionOperand& op) const {
66 return value_ == op.value_;
67 }
68
65 template <typename SubKindOperand> 69 template <typename SubKindOperand>
66 static SubKindOperand* New(Zone* zone, const SubKindOperand& op) { 70 static SubKindOperand* New(Zone* zone, const SubKindOperand& op) {
67 void* buffer = zone->New(sizeof(op)); 71 void* buffer = zone->New(sizeof(op));
68 return new (buffer) SubKindOperand(op); 72 return new (buffer) SubKindOperand(op);
69 } 73 }
70 74
71 static void ReplaceWith(InstructionOperand* dest, 75 static void ReplaceWith(InstructionOperand* dest,
72 const InstructionOperand* src) { 76 const InstructionOperand* src) {
73 *dest = *src; 77 *dest = *src;
74 } 78 }
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 1143
1140 1144
1141 std::ostream& operator<<(std::ostream& os, 1145 std::ostream& operator<<(std::ostream& os,
1142 const PrintableInstructionSequence& code); 1146 const PrintableInstructionSequence& code);
1143 1147
1144 } // namespace compiler 1148 } // namespace compiler
1145 } // namespace internal 1149 } // namespace internal
1146 } // namespace v8 1150 } // namespace v8
1147 1151
1148 #endif // V8_COMPILER_INSTRUCTION_H_ 1152 #endif // V8_COMPILER_INSTRUCTION_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/register-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698