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

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

Issue 1199983002: [strong] Implement strong property access semantics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add TODOs Created 5 years, 5 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/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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 std::ostream& operator<<(std::ostream&, DynamicContextAccess const&); 224 std::ostream& operator<<(std::ostream&, DynamicContextAccess const&);
225 225
226 DynamicContextAccess const& DynamicContextAccessOf(Operator const*); 226 DynamicContextAccess const& DynamicContextAccessOf(Operator const*);
227 227
228 228
229 // Defines the property being loaded from an object by a named load. This is 229 // Defines the property being loaded from an object by a named load. This is
230 // used as a parameter by JSLoadNamed and JSLoadGlobal operators. 230 // used as a parameter by JSLoadNamed and JSLoadGlobal operators.
231 class LoadNamedParameters final { 231 class LoadNamedParameters final {
232 public: 232 public:
233 LoadNamedParameters(const Unique<Name>& name, const VectorSlotPair& feedback, 233 LoadNamedParameters(const Unique<Name>& name, const VectorSlotPair& feedback,
234 LanguageMode language_mode,
234 ContextualMode contextual_mode) 235 ContextualMode contextual_mode)
235 : name_(name), feedback_(feedback), contextual_mode_(contextual_mode) {} 236 : name_(name),
237 feedback_(feedback),
238 language_mode_(language_mode),
239 contextual_mode_(contextual_mode) {}
236 240
237 const Unique<Name>& name() const { return name_; } 241 const Unique<Name>& name() const { return name_; }
242 LanguageMode language_mode() const { return language_mode_; }
238 ContextualMode contextual_mode() const { return contextual_mode_; } 243 ContextualMode contextual_mode() const { return contextual_mode_; }
239 244
240 const VectorSlotPair& feedback() const { return feedback_; } 245 const VectorSlotPair& feedback() const { return feedback_; }
241 246
242 private: 247 private:
243 const Unique<Name> name_; 248 const Unique<Name> name_;
244 const VectorSlotPair feedback_; 249 const VectorSlotPair feedback_;
250 const LanguageMode language_mode_;
245 const ContextualMode contextual_mode_; 251 const ContextualMode contextual_mode_;
246 }; 252 };
247 253
248 bool operator==(LoadNamedParameters const&, LoadNamedParameters const&); 254 bool operator==(LoadNamedParameters const&, LoadNamedParameters const&);
249 bool operator!=(LoadNamedParameters const&, LoadNamedParameters const&); 255 bool operator!=(LoadNamedParameters const&, LoadNamedParameters const&);
250 256
251 size_t hash_value(LoadNamedParameters const&); 257 size_t hash_value(LoadNamedParameters const&);
252 258
253 std::ostream& operator<<(std::ostream&, LoadNamedParameters const&); 259 std::ostream& operator<<(std::ostream&, LoadNamedParameters const&);
254 260
255 const LoadNamedParameters& LoadNamedParametersOf(const Operator* op); 261 const LoadNamedParameters& LoadNamedParametersOf(const Operator* op);
256 262
257 const LoadNamedParameters& LoadGlobalParametersOf(const Operator* op); 263 const LoadNamedParameters& LoadGlobalParametersOf(const Operator* op);
258 264
259 265
260 // Defines the property being loaded from an object. This is 266 // Defines the property being loaded from an object. This is
261 // used as a parameter by JSLoadProperty operators. 267 // used as a parameter by JSLoadProperty operators.
262 class LoadPropertyParameters final { 268 class LoadPropertyParameters final {
263 public: 269 public:
264 explicit LoadPropertyParameters(const VectorSlotPair& feedback) 270 explicit LoadPropertyParameters(const VectorSlotPair& feedback,
265 : feedback_(feedback) {} 271 LanguageMode language_mode)
272 : feedback_(feedback), language_mode_(language_mode) {}
266 273
267 const VectorSlotPair& feedback() const { return feedback_; } 274 const VectorSlotPair& feedback() const { return feedback_; }
268 275
276 LanguageMode language_mode() const { return language_mode_; }
277
269 private: 278 private:
270 const VectorSlotPair feedback_; 279 const VectorSlotPair feedback_;
280 const LanguageMode language_mode_;
271 }; 281 };
272 282
273 bool operator==(LoadPropertyParameters const&, LoadPropertyParameters const&); 283 bool operator==(LoadPropertyParameters const&, LoadPropertyParameters const&);
274 bool operator!=(LoadPropertyParameters const&, LoadPropertyParameters const&); 284 bool operator!=(LoadPropertyParameters const&, LoadPropertyParameters const&);
275 285
276 size_t hash_value(LoadPropertyParameters const&); 286 size_t hash_value(LoadPropertyParameters const&);
277 287
278 std::ostream& operator<<(std::ostream&, LoadPropertyParameters const&); 288 std::ostream& operator<<(std::ostream&, LoadPropertyParameters const&);
279 289
280 const LoadPropertyParameters& LoadPropertyParametersOf(const Operator* op); 290 const LoadPropertyParameters& LoadPropertyParametersOf(const Operator* op);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 const Operator* CreateLiteralArray(int literal_flags); 413 const Operator* CreateLiteralArray(int literal_flags);
404 const Operator* CreateLiteralObject(int literal_flags); 414 const Operator* CreateLiteralObject(int literal_flags);
405 415
406 const Operator* CallFunction( 416 const Operator* CallFunction(
407 size_t arity, CallFunctionFlags flags, LanguageMode language_mode, 417 size_t arity, CallFunctionFlags flags, LanguageMode language_mode,
408 VectorSlotPair const& feedback = VectorSlotPair()); 418 VectorSlotPair const& feedback = VectorSlotPair());
409 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); 419 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity);
410 420
411 const Operator* CallConstruct(int arguments); 421 const Operator* CallConstruct(int arguments);
412 422
413 const Operator* LoadProperty(const VectorSlotPair& feedback); 423 const Operator* LoadProperty(const VectorSlotPair& feedback,
424 LanguageMode language_mode);
414 const Operator* LoadNamed(const Unique<Name>& name, 425 const Operator* LoadNamed(const Unique<Name>& name,
415 const VectorSlotPair& feedback); 426 const VectorSlotPair& feedback,
427 LanguageMode language_mode);
416 428
417 const Operator* StoreProperty(LanguageMode language_mode, 429 const Operator* StoreProperty(LanguageMode language_mode,
418 const VectorSlotPair& feedback); 430 const VectorSlotPair& feedback);
419 const Operator* StoreNamed(LanguageMode language_mode, 431 const Operator* StoreNamed(LanguageMode language_mode,
420 const Unique<Name>& name, 432 const Unique<Name>& name,
421 const VectorSlotPair& feedback); 433 const VectorSlotPair& feedback);
422 434
423 const Operator* DeleteProperty(LanguageMode language_mode); 435 const Operator* DeleteProperty(LanguageMode language_mode);
424 436
425 const Operator* HasProperty(); 437 const Operator* HasProperty();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 Zone* const zone_; 479 Zone* const zone_;
468 480
469 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); 481 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder);
470 }; 482 };
471 483
472 } // namespace compiler 484 } // namespace compiler
473 } // namespace internal 485 } // namespace internal
474 } // namespace v8 486 } // namespace v8
475 487
476 #endif // V8_COMPILER_JS_OPERATOR_H_ 488 #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