OLD | NEW |
---|---|
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 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
400 bool operator==(StorePropertyParameters const&, StorePropertyParameters const&); | 400 bool operator==(StorePropertyParameters const&, StorePropertyParameters const&); |
401 bool operator!=(StorePropertyParameters const&, StorePropertyParameters const&); | 401 bool operator!=(StorePropertyParameters const&, StorePropertyParameters const&); |
402 | 402 |
403 size_t hash_value(StorePropertyParameters const&); | 403 size_t hash_value(StorePropertyParameters const&); |
404 | 404 |
405 std::ostream& operator<<(std::ostream&, StorePropertyParameters const&); | 405 std::ostream& operator<<(std::ostream&, StorePropertyParameters const&); |
406 | 406 |
407 const StorePropertyParameters& StorePropertyParametersOf(const Operator* op); | 407 const StorePropertyParameters& StorePropertyParametersOf(const Operator* op); |
408 | 408 |
409 | 409 |
410 // Defines specifics about arguments object or rest parameter creation. This is | |
411 // used as a parameter by JSCreateArguments operators. | |
412 class CreateArgumentsParameters final { | |
413 public: | |
414 enum Type { MAPPED_ARGUMENTS, UNMAPPED_ARGUMENTS, REST_ARRAY }; | |
Benedikt Meurer
2015/09/15 04:35:50
Style guide nit: use kMappedArguments, kUnmappedAr
Michael Starzinger
2015/09/15 07:39:27
Done.
| |
415 CreateArgumentsParameters(Type type, int start_index) | |
416 : type_(type), start_index_(start_index) {} | |
417 | |
418 Type type() const { return type_; } | |
419 int start_index() const { return start_index_; } | |
420 | |
421 private: | |
422 const Type type_; | |
423 const int start_index_; | |
424 }; | |
425 | |
426 bool operator==(CreateArgumentsParameters const&, | |
427 CreateArgumentsParameters const&); | |
428 bool operator!=(CreateArgumentsParameters const&, | |
429 CreateArgumentsParameters const&); | |
430 | |
431 size_t hash_value(CreateArgumentsParameters const&); | |
432 | |
433 std::ostream& operator<<(std::ostream&, CreateArgumentsParameters const&); | |
434 | |
435 | |
410 // Defines shared information for the closure that should be created. This is | 436 // Defines shared information for the closure that should be created. This is |
411 // used as a parameter by JSCreateClosure operators. | 437 // used as a parameter by JSCreateClosure operators. |
412 class CreateClosureParameters final { | 438 class CreateClosureParameters final { |
413 public: | 439 public: |
414 CreateClosureParameters(Handle<SharedFunctionInfo> shared_info, | 440 CreateClosureParameters(Handle<SharedFunctionInfo> shared_info, |
415 PretenureFlag pretenure) | 441 PretenureFlag pretenure) |
416 : shared_info_(shared_info), pretenure_(pretenure) {} | 442 : shared_info_(shared_info), pretenure_(pretenure) {} |
417 | 443 |
418 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } | 444 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } |
419 PretenureFlag pretenure() const { return pretenure_; } | 445 PretenureFlag pretenure() const { return pretenure_; } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
462 | 488 |
463 const Operator* UnaryNot(); | 489 const Operator* UnaryNot(); |
464 const Operator* ToBoolean(); | 490 const Operator* ToBoolean(); |
465 const Operator* ToNumber(); | 491 const Operator* ToNumber(); |
466 const Operator* ToString(); | 492 const Operator* ToString(); |
467 const Operator* ToName(); | 493 const Operator* ToName(); |
468 const Operator* ToObject(); | 494 const Operator* ToObject(); |
469 const Operator* Yield(); | 495 const Operator* Yield(); |
470 | 496 |
471 const Operator* Create(); | 497 const Operator* Create(); |
498 const Operator* CreateArguments(CreateArgumentsParameters::Type type, | |
499 int start_index); | |
472 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, | 500 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, |
473 PretenureFlag pretenure); | 501 PretenureFlag pretenure); |
474 const Operator* CreateLiteralArray(int literal_flags); | 502 const Operator* CreateLiteralArray(int literal_flags); |
475 const Operator* CreateLiteralObject(int literal_flags); | 503 const Operator* CreateLiteralObject(int literal_flags); |
476 | 504 |
477 const Operator* CallFunction( | 505 const Operator* CallFunction( |
478 size_t arity, CallFunctionFlags flags, LanguageMode language_mode, | 506 size_t arity, CallFunctionFlags flags, LanguageMode language_mode, |
479 VectorSlotPair const& feedback = VectorSlotPair(), | 507 VectorSlotPair const& feedback = VectorSlotPair(), |
480 TailCallMode tail_call_mode = NO_TAIL_CALLS); | 508 TailCallMode tail_call_mode = NO_TAIL_CALLS); |
481 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); | 509 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
543 Zone* const zone_; | 571 Zone* const zone_; |
544 | 572 |
545 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 573 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
546 }; | 574 }; |
547 | 575 |
548 } // namespace compiler | 576 } // namespace compiler |
549 } // namespace internal | 577 } // namespace internal |
550 } // namespace v8 | 578 } // namespace v8 |
551 | 579 |
552 #endif // V8_COMPILER_JS_OPERATOR_H_ | 580 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |