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

Side by Side Diff: src/compiler/simplified-operator.cc

Issue 560103003: [turbofan] Remove extra attributes from SimplifiedOperatorBuilder methods. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/compiler/simplified-operator.h" 5 #include "src/compiler/simplified-operator.h"
6 6
7 #include "src/base/lazy-instance.h" 7 #include "src/base/lazy-instance.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/types-inl.h" 10 #include "src/types-inl.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 111
112 static base::LazyInstance<SimplifiedOperatorBuilderImpl>::type kImpl = 112 static base::LazyInstance<SimplifiedOperatorBuilderImpl>::type kImpl =
113 LAZY_INSTANCE_INITIALIZER; 113 LAZY_INSTANCE_INITIALIZER;
114 114
115 115
116 SimplifiedOperatorBuilder::SimplifiedOperatorBuilder(Zone* zone) 116 SimplifiedOperatorBuilder::SimplifiedOperatorBuilder(Zone* zone)
117 : impl_(kImpl.Get()), zone_(zone) {} 117 : impl_(kImpl.Get()), zone_(zone) {}
118 118
119 119
120 #define PURE(Name, properties, input_count) \ 120 #define PURE(Name, properties, input_count) \
121 const Operator* SimplifiedOperatorBuilder::Name() const { \ 121 const Operator* SimplifiedOperatorBuilder::Name() { return &impl_.k##Name; }
122 return &impl_.k##Name; \
123 }
124 PURE_OP_LIST(PURE) 122 PURE_OP_LIST(PURE)
125 #undef PURE 123 #undef PURE
126 124
127 125
128 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) const { 126 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) {
129 // TODO(titzer): What about the type parameter? 127 // TODO(titzer): What about the type parameter?
130 return new (zone()) SimpleOperator(IrOpcode::kReferenceEqual, 128 return new (zone()) SimpleOperator(IrOpcode::kReferenceEqual,
131 Operator::kCommutative | Operator::kPure, 129 Operator::kCommutative | Operator::kPure,
132 2, 1, "ReferenceEqual"); 130 2, 1, "ReferenceEqual");
133 } 131 }
134 132
135 133
136 #define ACCESS(Name, Type, properties, input_count, output_count) \ 134 #define ACCESS(Name, Type, properties, input_count, output_count) \
137 const Operator* SimplifiedOperatorBuilder::Name(const Type& access) const { \ 135 const Operator* SimplifiedOperatorBuilder::Name(const Type& access) { \
138 return new (zone()) \ 136 return new (zone()) \
139 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ 137 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \
140 input_count, output_count, #Name, access); \ 138 input_count, output_count, #Name, access); \
141 } 139 }
142 ACCESS_OP_LIST(ACCESS) 140 ACCESS_OP_LIST(ACCESS)
143 #undef ACCESS 141 #undef ACCESS
144 142
145 } // namespace compiler 143 } // namespace compiler
146 } // namespace internal 144 } // namespace internal
147 } // namespace v8 145 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/simplified-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698