| Index: src/ast.h
|
| diff --git a/src/ast.h b/src/ast.h
|
| index aacc5e4fc8189d876c6331d895df252bdcbbeb90..2b33820f9e1ca029a190157adce3a8a583af995b 100644
|
| --- a/src/ast.h
|
| +++ b/src/ast.h
|
| @@ -32,7 +32,6 @@
|
|
|
| #include "assembler.h"
|
| #include "factory.h"
|
| -#include "feedback-slots.h"
|
| #include "isolate.h"
|
| #include "jsregexp.h"
|
| #include "list-inl.h"
|
| @@ -182,7 +181,7 @@ class AstProperties V8_FINAL BASE_EMBEDDED {
|
| public:
|
| class Flags : public EnumSet<AstPropertiesFlag, int> {};
|
|
|
| - AstProperties() : node_count_(0) {}
|
| + AstProperties() : node_count_(0) { }
|
|
|
| Flags* flags() { return &flags_; }
|
| int node_count() { return node_count_; }
|
| @@ -915,8 +914,7 @@ class ForEachStatement : public IterationStatement {
|
| };
|
|
|
|
|
| -class ForInStatement V8_FINAL : public ForEachStatement,
|
| - public FeedbackSlotInterface {
|
| +class ForInStatement V8_FINAL : public ForEachStatement {
|
| public:
|
| DECLARE_NODE_TYPE(ForInStatement)
|
|
|
| @@ -924,16 +922,7 @@ class ForInStatement V8_FINAL : public ForEachStatement,
|
| return subject();
|
| }
|
|
|
| - // Type feedback information.
|
| - virtual ComputablePhase GetComputablePhase() { return DURING_PARSE; }
|
| - virtual int ComputeFeedbackSlotCount(Isolate* isolate) { return 1; }
|
| - virtual void SetFirstFeedbackSlot(int slot) { for_in_feedback_slot_ = slot; }
|
| -
|
| - int ForInFeedbackSlot() {
|
| - ASSERT(for_in_feedback_slot_ != kInvalidFeedbackSlot);
|
| - return for_in_feedback_slot_;
|
| - }
|
| -
|
| + TypeFeedbackId ForInFeedbackId() const { return reuse(PrepareId()); }
|
| enum ForInType { FAST_FOR_IN, SLOW_FOR_IN };
|
| ForInType for_in_type() const { return for_in_type_; }
|
| void set_for_in_type(ForInType type) { for_in_type_ = type; }
|
| @@ -947,13 +936,11 @@ class ForInStatement V8_FINAL : public ForEachStatement,
|
| ForInStatement(Zone* zone, ZoneStringList* labels, int pos)
|
| : ForEachStatement(zone, labels, pos),
|
| for_in_type_(SLOW_FOR_IN),
|
| - for_in_feedback_slot_(kInvalidFeedbackSlot),
|
| body_id_(GetNextId(zone)),
|
| prepare_id_(GetNextId(zone)) {
|
| }
|
|
|
| ForInType for_in_type_;
|
| - int for_in_feedback_slot_;
|
| const BailoutId body_id_;
|
| const BailoutId prepare_id_;
|
| };
|
| @@ -1746,7 +1733,7 @@ class Property V8_FINAL : public Expression {
|
| };
|
|
|
|
|
| -class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
|
| +class Call V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(Call)
|
|
|
| @@ -1754,16 +1741,7 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
|
| ZoneList<Expression*>* arguments() const { return arguments_; }
|
|
|
| // Type feedback information.
|
| - virtual ComputablePhase GetComputablePhase() { return AFTER_SCOPING; }
|
| - virtual int ComputeFeedbackSlotCount(Isolate* isolate);
|
| - virtual void SetFirstFeedbackSlot(int slot) {
|
| - call_feedback_slot_ = slot;
|
| - }
|
| -
|
| - bool HasCallFeedbackSlot() const {
|
| - return call_feedback_slot_ != kInvalidFeedbackSlot;
|
| - }
|
| - int CallFeedbackSlot() const { return call_feedback_slot_; }
|
| + TypeFeedbackId CallFeedbackId() const { return reuse(id()); }
|
|
|
| virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
|
| if (expression()->IsProperty()) {
|
| @@ -1812,7 +1790,6 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
|
| : Expression(zone, pos),
|
| expression_(expression),
|
| arguments_(arguments),
|
| - call_feedback_slot_(kInvalidFeedbackSlot),
|
| return_id_(GetNextId(zone)) {
|
| if (expression->IsProperty()) {
|
| expression->AsProperty()->mark_for_call();
|
| @@ -1825,13 +1802,12 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
|
|
|
| Handle<JSFunction> target_;
|
| Handle<Cell> cell_;
|
| - int call_feedback_slot_;
|
|
|
| const BailoutId return_id_;
|
| };
|
|
|
|
|
| -class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface {
|
| +class CallNew V8_FINAL : public Expression {
|
| public:
|
| DECLARE_NODE_TYPE(CallNew)
|
|
|
| @@ -1839,17 +1815,6 @@ class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface {
|
| ZoneList<Expression*>* arguments() const { return arguments_; }
|
|
|
| // Type feedback information.
|
| - virtual ComputablePhase GetComputablePhase() { return DURING_PARSE; }
|
| - virtual int ComputeFeedbackSlotCount(Isolate* isolate) { return 1; }
|
| - virtual void SetFirstFeedbackSlot(int slot) {
|
| - callnew_feedback_slot_ = slot;
|
| - }
|
| -
|
| - int CallNewFeedbackSlot() {
|
| - ASSERT(callnew_feedback_slot_ != kInvalidFeedbackSlot);
|
| - return callnew_feedback_slot_;
|
| - }
|
| -
|
| TypeFeedbackId CallNewFeedbackId() const { return reuse(id()); }
|
| void RecordTypeFeedback(TypeFeedbackOracle* oracle);
|
| virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
|
| @@ -1859,8 +1824,6 @@ class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface {
|
| return allocation_site_;
|
| }
|
|
|
| - static int feedback_slots() { return 1; }
|
| -
|
| BailoutId ReturnId() const { return return_id_; }
|
|
|
| protected:
|
| @@ -1873,7 +1836,6 @@ class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface {
|
| arguments_(arguments),
|
| is_monomorphic_(false),
|
| elements_kind_(GetInitialFastElementsKind()),
|
| - callnew_feedback_slot_(kInvalidFeedbackSlot),
|
| return_id_(GetNextId(zone)) { }
|
|
|
| private:
|
| @@ -1884,7 +1846,6 @@ class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface {
|
| Handle<JSFunction> target_;
|
| ElementsKind elements_kind_;
|
| Handle<AllocationSite> allocation_site_;
|
| - int callnew_feedback_slot_;
|
|
|
| const BailoutId return_id_;
|
| };
|
| @@ -2371,15 +2332,7 @@ class FunctionLiteral V8_FINAL : public Expression {
|
| void set_ast_properties(AstProperties* ast_properties) {
|
| ast_properties_ = *ast_properties;
|
| }
|
| - void set_slot_processor(DeferredFeedbackSlotProcessor* slot_processor) {
|
| - slot_processor_ = *slot_processor;
|
| - }
|
| - void ProcessFeedbackSlots(Isolate* isolate) {
|
| - slot_processor_.ProcessFeedbackSlots(isolate);
|
| - }
|
| - int slot_count() {
|
| - return slot_processor_.slot_count();
|
| - }
|
| +
|
| bool dont_optimize() { return dont_optimize_reason_ != kNoReason; }
|
| BailoutReason dont_optimize_reason() { return dont_optimize_reason_; }
|
| void set_dont_optimize_reason(BailoutReason reason) {
|
| @@ -2429,7 +2382,6 @@ class FunctionLiteral V8_FINAL : public Expression {
|
| ZoneList<Statement*>* body_;
|
| Handle<String> inferred_name_;
|
| AstProperties ast_properties_;
|
| - DeferredFeedbackSlotProcessor slot_processor_;
|
| BailoutReason dont_optimize_reason_;
|
|
|
| int materialized_literal_count_;
|
| @@ -2904,13 +2856,10 @@ private: \
|
|
|
| class AstConstructionVisitor BASE_EMBEDDED {
|
| public:
|
| - explicit AstConstructionVisitor(Zone* zone)
|
| - : dont_optimize_reason_(kNoReason),
|
| - zone_(zone) { }
|
| + AstConstructionVisitor() : dont_optimize_reason_(kNoReason) { }
|
|
|
| AstProperties* ast_properties() { return &properties_; }
|
| BailoutReason dont_optimize_reason() { return dont_optimize_reason_; }
|
| - DeferredFeedbackSlotProcessor* slot_processor() { return &slot_processor_; }
|
|
|
| private:
|
| template<class> friend class AstNodeFactory;
|
| @@ -2927,21 +2876,13 @@ class AstConstructionVisitor BASE_EMBEDDED {
|
| dont_optimize_reason_ = reason;
|
| }
|
|
|
| - void add_slot_node(FeedbackSlotInterface* slot_node) {
|
| - slot_processor_.add_slot_node(zone_, slot_node);
|
| - }
|
| -
|
| AstProperties properties_;
|
| - DeferredFeedbackSlotProcessor slot_processor_;
|
| BailoutReason dont_optimize_reason_;
|
| - Zone* zone_;
|
| };
|
|
|
|
|
| class AstNullVisitor BASE_EMBEDDED {
|
| public:
|
| - explicit AstNullVisitor(Zone* zone) {}
|
| -
|
| // Node visitors.
|
| #define DEF_VISIT(type) \
|
| void Visit##type(type* node) {}
|
| @@ -2957,9 +2898,7 @@ class AstNullVisitor BASE_EMBEDDED {
|
| template<class Visitor>
|
| class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| public:
|
| - explicit AstNodeFactory(Zone* zone)
|
| - : zone_(zone),
|
| - visitor_(zone) { }
|
| + explicit AstNodeFactory(Zone* zone) : zone_(zone) { }
|
|
|
| Visitor* visitor() { return &visitor_; }
|
|
|
|
|