Chromium Code Reviews| Index: src/ast.h |
| diff --git a/src/ast.h b/src/ast.h |
| index 0115d988272c44e64f326d6f7377619824f2ea41..80071ebf2ad0d78da4d51ae3906561aec8642139 100644 |
| --- a/src/ast.h |
| +++ b/src/ast.h |
| @@ -1730,6 +1730,23 @@ class Property V8_FINAL : public Expression { |
| }; |
| +class AllocationSiteInfo: public ZoneObject { |
|
danno
2014/05/16 16:34:11
CallInfo? Don't wrap this puppy until we actually
mvstanton
2014/05/19 13:45:24
Sounds good.
|
| + public: |
| + explicit AllocationSiteInfo(Handle<AllocationSite> allocation_site) |
| + : allocation_site_(allocation_site) {} |
| + |
| + ElementsKind elements_kind() const { |
| + return allocation_site_->GetElementsKind(); |
| + } |
| + Handle<AllocationSite> allocation_site() const { |
| + return allocation_site_; |
| + } |
| + |
| + private: |
| + Handle<AllocationSite> allocation_site_; |
| +}; |
| + |
| + |
| class Call V8_FINAL : public Expression, public FeedbackSlotInterface { |
| public: |
| DECLARE_NODE_TYPE(Call) |
| @@ -1762,15 +1779,27 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface { |
| return !target_.is_null(); |
| } |
| + bool global_call() const { |
| + VariableProxy* proxy = expression_->AsVariableProxy(); |
| + return proxy != NULL && proxy->var()->IsUnallocated(); |
| + } |
| + |
| + bool known_global_function() const { |
| + return global_call() && !target_.is_null(); |
| + } |
| + |
| Handle<JSFunction> target() { return target_; } |
| Handle<Cell> cell() { return cell_; } |
| void set_target(Handle<JSFunction> target) { target_ = target; } |
| + void set_extra_info(Zone* zone, Handle<AllocationSite> site); |
| bool ComputeGlobalTarget(Handle<GlobalObject> global, LookupResult* lookup); |
| BailoutId ReturnId() const { return return_id_; } |
| + ZoneObject* extra_info() { return extra_info_; } |
| + |
| enum CallType { |
| POSSIBLY_EVAL_CALL, |
| GLOBAL_CALL, |
| @@ -1796,6 +1825,7 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface { |
| : Expression(zone, pos), |
| expression_(expression), |
| arguments_(arguments), |
| + extra_info_(NULL), |
| call_feedback_slot_(kInvalidFeedbackSlot), |
| return_id_(GetNextId(zone)) { |
| if (expression->IsProperty()) { |
| @@ -1809,6 +1839,7 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface { |
| Handle<JSFunction> target_; |
| Handle<Cell> cell_; |
| + ZoneObject* extra_info_; |
| int call_feedback_slot_; |
| const BailoutId return_id_; |