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 #include "src/type-hints.h" | 9 #include "src/type-hints.h" |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 private: | 35 private: |
36 const Handle<TypeFeedbackVector> vector_; | 36 const Handle<TypeFeedbackVector> vector_; |
37 const FeedbackVectorSlot slot_; | 37 const FeedbackVectorSlot slot_; |
38 }; | 38 }; |
39 | 39 |
40 bool operator==(VectorSlotPair const&, VectorSlotPair const&); | 40 bool operator==(VectorSlotPair const&, VectorSlotPair const&); |
41 bool operator!=(VectorSlotPair const&, VectorSlotPair const&); | 41 bool operator!=(VectorSlotPair const&, VectorSlotPair const&); |
42 | 42 |
43 size_t hash_value(VectorSlotPair const&); | 43 size_t hash_value(VectorSlotPair const&); |
44 | 44 |
| 45 std::ostream& operator<<(std::ostream&, VectorSlotPair const&); |
45 | 46 |
46 // The ConvertReceiverMode is used as parameter by JSConvertReceiver operators. | 47 // The ConvertReceiverMode is used as parameter by JSConvertReceiver operators. |
47 ConvertReceiverMode ConvertReceiverModeOf(Operator const* op); | 48 ConvertReceiverMode ConvertReceiverModeOf(Operator const* op); |
48 | 49 |
49 | 50 |
50 // The ToBooleanHints are used as parameter by JSToBoolean operators. | 51 // The ToBooleanHints are used as parameter by JSToBoolean operators. |
51 ToBooleanHints ToBooleanHintsOf(Operator const* op); | 52 ToBooleanHints ToBooleanHintsOf(Operator const* op); |
52 | 53 |
53 | 54 |
54 // Defines the arity and the feedback for a JavaScript constructor call. This is | 55 // Defines the arity and the feedback for a JavaScript constructor call. This is |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 size_t hash_value(CreateLiteralParameters const&); | 407 size_t hash_value(CreateLiteralParameters const&); |
407 | 408 |
408 std::ostream& operator<<(std::ostream&, CreateLiteralParameters const&); | 409 std::ostream& operator<<(std::ostream&, CreateLiteralParameters const&); |
409 | 410 |
410 const CreateLiteralParameters& CreateLiteralParametersOf(const Operator* op); | 411 const CreateLiteralParameters& CreateLiteralParametersOf(const Operator* op); |
411 | 412 |
412 BinaryOperationHint BinaryOperationHintOf(const Operator* op); | 413 BinaryOperationHint BinaryOperationHintOf(const Operator* op); |
413 | 414 |
414 CompareOperationHint CompareOperationHintOf(const Operator* op); | 415 CompareOperationHint CompareOperationHintOf(const Operator* op); |
415 | 416 |
| 417 VectorSlotPair const& VectorSlotPairOf(const Operator* op) WARN_UNUSED_RESULT; |
| 418 |
416 // Interface for building JavaScript-level operators, e.g. directly from the | 419 // Interface for building JavaScript-level operators, e.g. directly from the |
417 // AST. Most operators have no parameters, thus can be globally shared for all | 420 // AST. Most operators have no parameters, thus can be globally shared for all |
418 // graphs. | 421 // graphs. |
419 class JSOperatorBuilder final : public ZoneObject { | 422 class JSOperatorBuilder final : public ZoneObject { |
420 public: | 423 public: |
421 explicit JSOperatorBuilder(Zone* zone); | 424 explicit JSOperatorBuilder(Zone* zone); |
422 | 425 |
423 const Operator* Equal(CompareOperationHint hint); | 426 const Operator* Equal(CompareOperationHint hint); |
424 const Operator* NotEqual(CompareOperationHint hint); | 427 const Operator* NotEqual(CompareOperationHint hint); |
425 const Operator* StrictEqual(CompareOperationHint hint); | 428 const Operator* StrictEqual(CompareOperationHint hint); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 const VectorSlotPair& feedback, | 496 const VectorSlotPair& feedback, |
494 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); | 497 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); |
495 const Operator* StoreGlobal(LanguageMode language_mode, | 498 const Operator* StoreGlobal(LanguageMode language_mode, |
496 const Handle<Name>& name, | 499 const Handle<Name>& name, |
497 const VectorSlotPair& feedback); | 500 const VectorSlotPair& feedback); |
498 | 501 |
499 const Operator* LoadContext(size_t depth, size_t index, bool immutable); | 502 const Operator* LoadContext(size_t depth, size_t index, bool immutable); |
500 const Operator* StoreContext(size_t depth, size_t index); | 503 const Operator* StoreContext(size_t depth, size_t index); |
501 | 504 |
502 const Operator* TypeOf(); | 505 const Operator* TypeOf(); |
503 const Operator* InstanceOf(); | 506 const Operator* InstanceOf(VectorSlotPair const& feedback); |
504 | 507 |
505 const Operator* ForInNext(); | 508 const Operator* ForInNext(); |
506 const Operator* ForInPrepare(); | 509 const Operator* ForInPrepare(); |
507 | 510 |
508 const Operator* LoadMessage(); | 511 const Operator* LoadMessage(); |
509 const Operator* StoreMessage(); | 512 const Operator* StoreMessage(); |
510 | 513 |
511 // Used to implement Ignition's SuspendGenerator bytecode. | 514 // Used to implement Ignition's SuspendGenerator bytecode. |
512 const Operator* GeneratorStore(int register_count); | 515 const Operator* GeneratorStore(int register_count); |
513 | 516 |
(...skipping 18 matching lines...) Expand all Loading... |
532 Zone* const zone_; | 535 Zone* const zone_; |
533 | 536 |
534 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 537 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
535 }; | 538 }; |
536 | 539 |
537 } // namespace compiler | 540 } // namespace compiler |
538 } // namespace internal | 541 } // namespace internal |
539 } // namespace v8 | 542 } // namespace v8 |
540 | 543 |
541 #endif // V8_COMPILER_JS_OPERATOR_H_ | 544 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |