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

Side by Side Diff: src/compiler/js-operator.h

Issue 633423002: Teach TurboFan to call vector-based ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed nits. Created 6 years, 2 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/js-generic-lowering.cc ('k') | src/compiler/js-operator.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_JS_OPERATOR_H_ 5 #ifndef V8_COMPILER_JS_OPERATOR_H_
6 #define V8_COMPILER_JS_OPERATOR_H_ 6 #define V8_COMPILER_JS_OPERATOR_H_
7 7
8 #include "src/runtime/runtime.h" 8 #include "src/runtime/runtime.h"
9 #include "src/unique.h" 9 #include "src/unique.h"
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bool operator==(ContextAccess const&, ContextAccess const&); 89 bool operator==(ContextAccess const&, ContextAccess const&);
90 bool operator!=(ContextAccess const&, ContextAccess const&); 90 bool operator!=(ContextAccess const&, ContextAccess const&);
91 91
92 size_t hash_value(ContextAccess const&); 92 size_t hash_value(ContextAccess const&);
93 93
94 std::ostream& operator<<(std::ostream&, ContextAccess const&); 94 std::ostream& operator<<(std::ostream&, ContextAccess const&);
95 95
96 ContextAccess const& ContextAccessOf(Operator const*); 96 ContextAccess const& ContextAccessOf(Operator const*);
97 97
98 98
99 class VectorSlotPair {
100 public:
101 VectorSlotPair(Handle<TypeFeedbackVector> vector, int slot)
102 : vector_(vector), slot_(slot) {}
103
104 Handle<TypeFeedbackVector> vector() const { return vector_; }
105 int slot() const { return slot_; }
106
107 private:
108 const Handle<TypeFeedbackVector> vector_;
109 const int slot_;
110 };
111
112
113 bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs);
114
115
99 // Defines the property being loaded from an object by a named load. This is 116 // Defines the property being loaded from an object by a named load. This is
100 // used as a parameter by JSLoadNamed operators. 117 // used as a parameter by JSLoadNamed operators.
101 class LoadNamedParameters FINAL { 118 class LoadNamedParameters FINAL {
102 public: 119 public:
103 LoadNamedParameters(const Unique<Name>& name, ContextualMode contextual_mode) 120 LoadNamedParameters(const Unique<Name>& name, const VectorSlotPair& feedback,
104 : name_(name), contextual_mode_(contextual_mode) {} 121 ContextualMode contextual_mode)
122 : name_(name), contextual_mode_(contextual_mode), feedback_(feedback) {}
105 123
106 const Unique<Name>& name() const { return name_; } 124 const Unique<Name>& name() const { return name_; }
107 ContextualMode contextual_mode() const { return contextual_mode_; } 125 ContextualMode contextual_mode() const { return contextual_mode_; }
108 126
127 const VectorSlotPair& feedback() const { return feedback_; }
128
109 private: 129 private:
110 const Unique<Name> name_; 130 const Unique<Name> name_;
111 const ContextualMode contextual_mode_; 131 const ContextualMode contextual_mode_;
132 const VectorSlotPair feedback_;
112 }; 133 };
113 134
114 bool operator==(LoadNamedParameters const&, LoadNamedParameters const&); 135 bool operator==(LoadNamedParameters const&, LoadNamedParameters const&);
115 bool operator!=(LoadNamedParameters const&, LoadNamedParameters const&); 136 bool operator!=(LoadNamedParameters const&, LoadNamedParameters const&);
116 137
117 size_t hash_value(LoadNamedParameters const&); 138 size_t hash_value(LoadNamedParameters const&);
118 139
119 std::ostream& operator<<(std::ostream&, LoadNamedParameters const&); 140 std::ostream& operator<<(std::ostream&, LoadNamedParameters const&);
120 141
121 const LoadNamedParameters& LoadNamedParametersOf(const Operator* op); 142 const LoadNamedParameters& LoadNamedParametersOf(const Operator* op);
122 143
123 144
145 // Defines the property being loaded from an object. This is
146 // used as a parameter by JSLoadProperty operators.
147 class LoadPropertyParameters FINAL {
148 public:
149 explicit LoadPropertyParameters(const VectorSlotPair& feedback)
150 : feedback_(feedback) {}
151
152 const VectorSlotPair& feedback() const { return feedback_; }
153
154 private:
155 const VectorSlotPair feedback_;
156 };
157
158 bool operator==(LoadPropertyParameters const&, LoadPropertyParameters const&);
159 bool operator!=(LoadPropertyParameters const&, LoadPropertyParameters const&);
160
161 size_t hash_value(LoadPropertyParameters const&);
162
163 std::ostream& operator<<(std::ostream&, LoadPropertyParameters const&);
164
165 const LoadPropertyParameters& LoadPropertyParametersOf(const Operator* op);
166
167
124 // Defines the property being stored to an object by a named store. This is 168 // Defines the property being stored to an object by a named store. This is
125 // used as a parameter by JSStoreNamed operators. 169 // used as a parameter by JSStoreNamed operators.
126 class StoreNamedParameters FINAL { 170 class StoreNamedParameters FINAL {
127 public: 171 public:
128 StoreNamedParameters(StrictMode strict_mode, const Unique<Name>& name) 172 StoreNamedParameters(StrictMode strict_mode, const Unique<Name>& name)
129 : strict_mode_(strict_mode), name_(name) {} 173 : strict_mode_(strict_mode), name_(name) {}
130 174
131 StrictMode strict_mode() const { return strict_mode_; } 175 StrictMode strict_mode() const { return strict_mode_; }
132 const Unique<Name>& name() const { return name_; } 176 const Unique<Name>& name() const { return name_; }
133 177
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 const Operator* ToObject(); 225 const Operator* ToObject();
182 const Operator* Yield(); 226 const Operator* Yield();
183 227
184 const Operator* Create(); 228 const Operator* Create();
185 229
186 const Operator* CallFunction(size_t arity, CallFunctionFlags flags); 230 const Operator* CallFunction(size_t arity, CallFunctionFlags flags);
187 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); 231 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity);
188 232
189 const Operator* CallConstruct(int arguments); 233 const Operator* CallConstruct(int arguments);
190 234
191 const Operator* LoadProperty(); 235 const Operator* LoadProperty(const VectorSlotPair& feedback);
192 const Operator* LoadNamed(const Unique<Name>& name, 236 const Operator* LoadNamed(const Unique<Name>& name,
237 const VectorSlotPair& feedback,
193 ContextualMode contextual_mode = NOT_CONTEXTUAL); 238 ContextualMode contextual_mode = NOT_CONTEXTUAL);
194 239
195 const Operator* StoreProperty(StrictMode strict_mode); 240 const Operator* StoreProperty(StrictMode strict_mode);
196 const Operator* StoreNamed(StrictMode strict_mode, const Unique<Name>& name); 241 const Operator* StoreNamed(StrictMode strict_mode, const Unique<Name>& name);
197 242
198 const Operator* DeleteProperty(StrictMode strict_mode); 243 const Operator* DeleteProperty(StrictMode strict_mode);
199 244
200 const Operator* HasProperty(); 245 const Operator* HasProperty();
201 246
202 const Operator* LoadContext(size_t depth, size_t index, bool immutable); 247 const Operator* LoadContext(size_t depth, size_t index, bool immutable);
(...skipping 16 matching lines...) Expand all
219 264
220 const JSOperatorBuilderImpl& impl_; 265 const JSOperatorBuilderImpl& impl_;
221 Zone* const zone_; 266 Zone* const zone_;
222 }; 267 };
223 268
224 } // namespace compiler 269 } // namespace compiler
225 } // namespace internal 270 } // namespace internal
226 } // namespace v8 271 } // namespace v8
227 272
228 #endif // V8_COMPILER_JS_OPERATOR_H_ 273 #endif // V8_COMPILER_JS_OPERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698