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/base/compiler-specific.h" | 8 #include "src/base/compiler-specific.h" |
9 #include "src/globals.h" | 9 #include "src/globals.h" |
10 #include "src/runtime/runtime.h" | 10 #include "src/runtime/runtime.h" |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 std::ostream& operator<<(std::ostream&, CreateArrayParameters const&); | 406 std::ostream& operator<<(std::ostream&, CreateArrayParameters const&); |
407 | 407 |
408 const CreateArrayParameters& CreateArrayParametersOf(const Operator* op); | 408 const CreateArrayParameters& CreateArrayParametersOf(const Operator* op); |
409 | 409 |
410 | 410 |
411 // Defines shared information for the closure that should be created. This is | 411 // Defines shared information for the closure that should be created. This is |
412 // used as a parameter by JSCreateClosure operators. | 412 // used as a parameter by JSCreateClosure operators. |
413 class CreateClosureParameters final { | 413 class CreateClosureParameters final { |
414 public: | 414 public: |
415 CreateClosureParameters(Handle<SharedFunctionInfo> shared_info, | 415 CreateClosureParameters(Handle<SharedFunctionInfo> shared_info, |
| 416 VectorSlotPair const& feedback, |
416 PretenureFlag pretenure) | 417 PretenureFlag pretenure) |
417 : shared_info_(shared_info), pretenure_(pretenure) {} | 418 : shared_info_(shared_info), feedback_(feedback), pretenure_(pretenure) {} |
418 | 419 |
419 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } | 420 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } |
| 421 VectorSlotPair const& feedback() const { return feedback_; } |
420 PretenureFlag pretenure() const { return pretenure_; } | 422 PretenureFlag pretenure() const { return pretenure_; } |
421 | 423 |
422 private: | 424 private: |
423 const Handle<SharedFunctionInfo> shared_info_; | 425 const Handle<SharedFunctionInfo> shared_info_; |
| 426 VectorSlotPair const feedback_; |
424 const PretenureFlag pretenure_; | 427 const PretenureFlag pretenure_; |
425 }; | 428 }; |
426 | 429 |
427 bool operator==(CreateClosureParameters const&, CreateClosureParameters const&); | 430 bool operator==(CreateClosureParameters const&, CreateClosureParameters const&); |
428 bool operator!=(CreateClosureParameters const&, CreateClosureParameters const&); | 431 bool operator!=(CreateClosureParameters const&, CreateClosureParameters const&); |
429 | 432 |
430 size_t hash_value(CreateClosureParameters const&); | 433 size_t hash_value(CreateClosureParameters const&); |
431 | 434 |
432 std::ostream& operator<<(std::ostream&, CreateClosureParameters const&); | 435 std::ostream& operator<<(std::ostream&, CreateClosureParameters const&); |
433 | 436 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 const Operator* ToLength(); | 504 const Operator* ToLength(); |
502 const Operator* ToName(); | 505 const Operator* ToName(); |
503 const Operator* ToNumber(); | 506 const Operator* ToNumber(); |
504 const Operator* ToObject(); | 507 const Operator* ToObject(); |
505 const Operator* ToString(); | 508 const Operator* ToString(); |
506 | 509 |
507 const Operator* Create(); | 510 const Operator* Create(); |
508 const Operator* CreateArguments(CreateArgumentsType type); | 511 const Operator* CreateArguments(CreateArgumentsType type); |
509 const Operator* CreateArray(size_t arity, Handle<AllocationSite> site); | 512 const Operator* CreateArray(size_t arity, Handle<AllocationSite> site); |
510 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, | 513 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, |
| 514 VectorSlotPair const& feedback, |
511 PretenureFlag pretenure); | 515 PretenureFlag pretenure); |
512 const Operator* CreateIterResultObject(); | 516 const Operator* CreateIterResultObject(); |
513 const Operator* CreateKeyValueArray(); | 517 const Operator* CreateKeyValueArray(); |
514 const Operator* CreateLiteralArray(Handle<ConstantElementsPair> constant, | 518 const Operator* CreateLiteralArray(Handle<ConstantElementsPair> constant, |
515 int literal_flags, int literal_index, | 519 int literal_flags, int literal_index, |
516 int number_of_elements); | 520 int number_of_elements); |
517 const Operator* CreateLiteralObject(Handle<FixedArray> constant_properties, | 521 const Operator* CreateLiteralObject(Handle<FixedArray> constant_properties, |
518 int literal_flags, int literal_index, | 522 int literal_flags, int literal_index, |
519 int number_of_properties); | 523 int number_of_properties); |
520 const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, | 524 const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 Zone* const zone_; | 601 Zone* const zone_; |
598 | 602 |
599 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 603 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
600 }; | 604 }; |
601 | 605 |
602 } // namespace compiler | 606 } // namespace compiler |
603 } // namespace internal | 607 } // namespace internal |
604 } // namespace v8 | 608 } // namespace v8 |
605 | 609 |
606 #endif // V8_COMPILER_JS_OPERATOR_H_ | 610 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |