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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 std::ostream& operator<<(std::ostream&, CreateArrayParameters const&); | 354 std::ostream& operator<<(std::ostream&, CreateArrayParameters const&); |
355 | 355 |
356 const CreateArrayParameters& CreateArrayParametersOf(const Operator* op); | 356 const CreateArrayParameters& CreateArrayParametersOf(const Operator* op); |
357 | 357 |
358 | 358 |
359 // Defines shared information for the closure that should be created. This is | 359 // Defines shared information for the closure that should be created. This is |
360 // used as a parameter by JSCreateClosure operators. | 360 // used as a parameter by JSCreateClosure operators. |
361 class CreateClosureParameters final { | 361 class CreateClosureParameters final { |
362 public: | 362 public: |
363 CreateClosureParameters(Handle<SharedFunctionInfo> shared_info, | 363 CreateClosureParameters(Handle<SharedFunctionInfo> shared_info, |
| 364 VectorSlotPair const& feedback, |
364 PretenureFlag pretenure) | 365 PretenureFlag pretenure) |
365 : shared_info_(shared_info), pretenure_(pretenure) {} | 366 : shared_info_(shared_info), feedback_(feedback), pretenure_(pretenure) {} |
366 | 367 |
367 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } | 368 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } |
| 369 VectorSlotPair const& feedback() const { return feedback_; } |
368 PretenureFlag pretenure() const { return pretenure_; } | 370 PretenureFlag pretenure() const { return pretenure_; } |
369 | 371 |
370 private: | 372 private: |
371 const Handle<SharedFunctionInfo> shared_info_; | 373 const Handle<SharedFunctionInfo> shared_info_; |
| 374 VectorSlotPair const feedback_; |
372 const PretenureFlag pretenure_; | 375 const PretenureFlag pretenure_; |
373 }; | 376 }; |
374 | 377 |
375 bool operator==(CreateClosureParameters const&, CreateClosureParameters const&); | 378 bool operator==(CreateClosureParameters const&, CreateClosureParameters const&); |
376 bool operator!=(CreateClosureParameters const&, CreateClosureParameters const&); | 379 bool operator!=(CreateClosureParameters const&, CreateClosureParameters const&); |
377 | 380 |
378 size_t hash_value(CreateClosureParameters const&); | 381 size_t hash_value(CreateClosureParameters const&); |
379 | 382 |
380 std::ostream& operator<<(std::ostream&, CreateClosureParameters const&); | 383 std::ostream& operator<<(std::ostream&, CreateClosureParameters const&); |
381 | 384 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 const Operator* ToLength(); | 452 const Operator* ToLength(); |
450 const Operator* ToName(); | 453 const Operator* ToName(); |
451 const Operator* ToNumber(); | 454 const Operator* ToNumber(); |
452 const Operator* ToObject(); | 455 const Operator* ToObject(); |
453 const Operator* ToString(); | 456 const Operator* ToString(); |
454 | 457 |
455 const Operator* Create(); | 458 const Operator* Create(); |
456 const Operator* CreateArguments(CreateArgumentsType type); | 459 const Operator* CreateArguments(CreateArgumentsType type); |
457 const Operator* CreateArray(size_t arity, Handle<AllocationSite> site); | 460 const Operator* CreateArray(size_t arity, Handle<AllocationSite> site); |
458 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, | 461 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, |
| 462 VectorSlotPair const& feedback, |
459 PretenureFlag pretenure); | 463 PretenureFlag pretenure); |
460 const Operator* CreateIterResultObject(); | 464 const Operator* CreateIterResultObject(); |
461 const Operator* CreateKeyValueArray(); | 465 const Operator* CreateKeyValueArray(); |
462 const Operator* CreateLiteralArray(Handle<FixedArray> constant_elements, | 466 const Operator* CreateLiteralArray(Handle<FixedArray> constant_elements, |
463 int literal_flags, int literal_index, | 467 int literal_flags, int literal_index, |
464 int number_of_elements); | 468 int number_of_elements); |
465 const Operator* CreateLiteralObject(Handle<FixedArray> constant_properties, | 469 const Operator* CreateLiteralObject(Handle<FixedArray> constant_properties, |
466 int literal_flags, int literal_index, | 470 int literal_flags, int literal_index, |
467 int number_of_properties); | 471 int number_of_properties); |
468 const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, | 472 const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 Zone* const zone_; | 546 Zone* const zone_; |
543 | 547 |
544 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 548 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
545 }; | 549 }; |
546 | 550 |
547 } // namespace compiler | 551 } // namespace compiler |
548 } // namespace internal | 552 } // namespace internal |
549 } // namespace v8 | 553 } // namespace v8 |
550 | 554 |
551 #endif // V8_COMPILER_JS_OPERATOR_H_ | 555 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |