OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_AST_H_ | 5 #ifndef V8_AST_H_ |
6 #define V8_AST_H_ | 6 #define V8_AST_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
(...skipping 2573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2584 | 2584 |
2585 | 2585 |
2586 class SuperReference FINAL : public Expression { | 2586 class SuperReference FINAL : public Expression { |
2587 public: | 2587 public: |
2588 DECLARE_NODE_TYPE(SuperReference) | 2588 DECLARE_NODE_TYPE(SuperReference) |
2589 | 2589 |
2590 VariableProxy* this_var() const { return this_var_; } | 2590 VariableProxy* this_var() const { return this_var_; } |
2591 | 2591 |
2592 TypeFeedbackId HomeObjectFeedbackId() { return reuse(id()); } | 2592 TypeFeedbackId HomeObjectFeedbackId() { return reuse(id()); } |
2593 | 2593 |
| 2594 // Type feedback information. |
| 2595 virtual int ComputeFeedbackSlotCount() { return FLAG_vector_ics ? 1 : 0; } |
| 2596 virtual void SetFirstFeedbackSlot(int slot) { |
| 2597 homeobject_feedback_slot_ = slot; |
| 2598 } |
| 2599 |
| 2600 int HomeObjectFeedbackSlot() { |
| 2601 DCHECK(!FLAG_vector_ics || |
| 2602 homeobject_feedback_slot_ != kInvalidFeedbackSlot); |
| 2603 return homeobject_feedback_slot_; |
| 2604 } |
| 2605 |
2594 protected: | 2606 protected: |
2595 SuperReference(Zone* zone, VariableProxy* this_var, int pos, IdGen* id_gen) | 2607 SuperReference(Zone* zone, VariableProxy* this_var, int pos, IdGen* id_gen) |
2596 : Expression(zone, pos, id_gen), this_var_(this_var) { | 2608 : Expression(zone, pos, id_gen), |
| 2609 this_var_(this_var), |
| 2610 homeobject_feedback_slot_(kInvalidFeedbackSlot) { |
2597 DCHECK(this_var->is_this()); | 2611 DCHECK(this_var->is_this()); |
2598 } | 2612 } |
2599 | 2613 |
2600 VariableProxy* this_var_; | 2614 VariableProxy* this_var_; |
| 2615 int homeobject_feedback_slot_; |
2601 }; | 2616 }; |
2602 | 2617 |
2603 | 2618 |
2604 #undef DECLARE_NODE_TYPE | 2619 #undef DECLARE_NODE_TYPE |
2605 | 2620 |
2606 | 2621 |
2607 // ---------------------------------------------------------------------------- | 2622 // ---------------------------------------------------------------------------- |
2608 // Regular expressions | 2623 // Regular expressions |
2609 | 2624 |
2610 | 2625 |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3566 Zone* zone_; | 3581 Zone* zone_; |
3567 Visitor visitor_; | 3582 Visitor visitor_; |
3568 AstValueFactory* ast_value_factory_; | 3583 AstValueFactory* ast_value_factory_; |
3569 AstNode::IdGen* id_gen_; | 3584 AstNode::IdGen* id_gen_; |
3570 }; | 3585 }; |
3571 | 3586 |
3572 | 3587 |
3573 } } // namespace v8::internal | 3588 } } // namespace v8::internal |
3574 | 3589 |
3575 #endif // V8_AST_H_ | 3590 #endif // V8_AST_H_ |
OLD | NEW |