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

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: Patch One. 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
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Defines the property being loaded from an object by a named load. This is 99 // Defines the property being loaded from an object by a named load. This is
100 // used as a parameter by JSLoadNamed operators. 100 // used as a parameter by JSLoadNamed operators.
101 class LoadNamedParameters FINAL { 101 class LoadNamedParameters FINAL {
102 public: 102 public:
103 LoadNamedParameters(const Unique<Name>& name, ContextualMode contextual_mode) 103 LoadNamedParameters(const Unique<Name>& name,
104 : name_(name), contextual_mode_(contextual_mode) {} 104 const LoadICFeedbackNode& feedback,
105 ContextualMode contextual_mode)
106 : name_(name), contextual_mode_(contextual_mode), feedback_(feedback) {}
105 107
106 const Unique<Name>& name() const { return name_; } 108 const Unique<Name>& name() const { return name_; }
107 ContextualMode contextual_mode() const { return contextual_mode_; } 109 ContextualMode contextual_mode() const { return contextual_mode_; }
108 110
111 const LoadICFeedbackNode& feedback() const { return feedback_; }
112
109 private: 113 private:
110 const Unique<Name> name_; 114 const Unique<Name> name_;
111 const ContextualMode contextual_mode_; 115 const ContextualMode contextual_mode_;
116 const LoadICFeedbackNode feedback_;
112 }; 117 };
113 118
114 bool operator==(LoadNamedParameters const&, LoadNamedParameters const&); 119 bool operator==(LoadNamedParameters const&, LoadNamedParameters const&);
115 bool operator!=(LoadNamedParameters const&, LoadNamedParameters const&); 120 bool operator!=(LoadNamedParameters const&, LoadNamedParameters const&);
116 121
117 size_t hash_value(LoadNamedParameters const&); 122 size_t hash_value(LoadNamedParameters const&);
118 123
119 std::ostream& operator<<(std::ostream&, LoadNamedParameters const&); 124 std::ostream& operator<<(std::ostream&, LoadNamedParameters const&);
120 125
121 const LoadNamedParameters& LoadNamedParametersOf(const Operator* op); 126 const LoadNamedParameters& LoadNamedParametersOf(const Operator* op);
122 127
123 128
129 // Defines the property being loaded from an object. This is
130 // used as a parameter by JSLoadProperty operators.
131 class LoadPropertyParameters FINAL {
132 public:
133 explicit LoadPropertyParameters(const KeyedLoadICFeedbackNode& feedback)
134 : feedback_(feedback) {}
135
136 const KeyedLoadICFeedbackNode& feedback() const { return feedback_; }
137
138 private:
139 const KeyedLoadICFeedbackNode feedback_;
140 };
141
142 bool operator==(LoadPropertyParameters const&, LoadPropertyParameters const&);
143 bool operator!=(LoadPropertyParameters const&, LoadPropertyParameters const&);
144
145 size_t hash_value(LoadPropertyParameters const&);
146
147 std::ostream& operator<<(std::ostream&, LoadPropertyParameters const&);
148
149 const LoadPropertyParameters& LoadPropertyParametersOf(const Operator* op);
150
151
124 // Defines the property being stored to an object by a named store. This is 152 // Defines the property being stored to an object by a named store. This is
125 // used as a parameter by JSStoreNamed operators. 153 // used as a parameter by JSStoreNamed operators.
126 class StoreNamedParameters FINAL { 154 class StoreNamedParameters FINAL {
127 public: 155 public:
128 StoreNamedParameters(StrictMode strict_mode, const Unique<Name>& name) 156 StoreNamedParameters(StrictMode strict_mode, const Unique<Name>& name)
129 : strict_mode_(strict_mode), name_(name) {} 157 : strict_mode_(strict_mode), name_(name) {}
130 158
131 StrictMode strict_mode() const { return strict_mode_; } 159 StrictMode strict_mode() const { return strict_mode_; }
132 const Unique<Name>& name() const { return name_; } 160 const Unique<Name>& name() const { return name_; }
133 161
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 const Operator* ToObject(); 209 const Operator* ToObject();
182 const Operator* Yield(); 210 const Operator* Yield();
183 211
184 const Operator* Create(); 212 const Operator* Create();
185 213
186 const Operator* CallFunction(size_t arity, CallFunctionFlags flags); 214 const Operator* CallFunction(size_t arity, CallFunctionFlags flags);
187 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); 215 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity);
188 216
189 const Operator* CallConstruct(int arguments); 217 const Operator* CallConstruct(int arguments);
190 218
191 const Operator* LoadProperty(); 219 const Operator* LoadProperty(const KeyedLoadICFeedbackNode& feedback);
192 const Operator* LoadNamed(const Unique<Name>& name, 220 const Operator* LoadNamed(const Unique<Name>& name,
221 const LoadICFeedbackNode& feedback,
193 ContextualMode contextual_mode = NOT_CONTEXTUAL); 222 ContextualMode contextual_mode = NOT_CONTEXTUAL);
194 223
195 const Operator* StoreProperty(StrictMode strict_mode); 224 const Operator* StoreProperty(StrictMode strict_mode);
196 const Operator* StoreNamed(StrictMode strict_mode, const Unique<Name>& name); 225 const Operator* StoreNamed(StrictMode strict_mode, const Unique<Name>& name);
197 226
198 const Operator* DeleteProperty(StrictMode strict_mode); 227 const Operator* DeleteProperty(StrictMode strict_mode);
199 228
200 const Operator* HasProperty(); 229 const Operator* HasProperty();
201 230
202 const Operator* LoadContext(size_t depth, size_t index, bool immutable); 231 const Operator* LoadContext(size_t depth, size_t index, bool immutable);
(...skipping 16 matching lines...) Expand all
219 248
220 const JSOperatorBuilderImpl& impl_; 249 const JSOperatorBuilderImpl& impl_;
221 Zone* const zone_; 250 Zone* const zone_;
222 }; 251 };
223 252
224 } // namespace compiler 253 } // namespace compiler
225 } // namespace internal 254 } // namespace internal
226 } // namespace v8 255 } // namespace v8
227 256
228 #endif // V8_COMPILER_JS_OPERATOR_H_ 257 #endif // V8_COMPILER_JS_OPERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698