Chromium Code Reviews| Index: src/ast.h |
| diff --git a/src/ast.h b/src/ast.h |
| index 1366041387215bc4c018c4b1650d39ff5f6549c4..8b31d4b722f8e5dbdf5a6e190269aa51e93790c4 100644 |
| --- a/src/ast.h |
| +++ b/src/ast.h |
| @@ -2031,51 +2031,26 @@ class CallRuntime final : public Expression { |
| public: |
| DECLARE_NODE_TYPE(CallRuntime) |
| - Handle<String> name() const { return raw_name_->string(); } |
| - const AstRawString* raw_name() const { return raw_name_; } |
| const Runtime::Function* function() const { return function_; } |
| ZoneList<Expression*>* arguments() const { return arguments_; } |
| - bool is_jsruntime() const { return function_ == NULL; } |
| - |
| - // Type feedback information. |
| - bool HasCallRuntimeFeedbackSlot() const { return is_jsruntime(); } |
| - virtual FeedbackVectorRequirements ComputeFeedbackRequirements( |
| - Isolate* isolate, const ICSlotCache* cache) override { |
| - return FeedbackVectorRequirements(0, HasCallRuntimeFeedbackSlot() ? 1 : 0); |
| - } |
| - void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot, |
| - ICSlotCache* cache) override { |
| - callruntime_feedback_slot_ = slot; |
| - } |
| - Code::Kind FeedbackICSlotKind(int index) override { return Code::LOAD_IC; } |
| - |
| - FeedbackVectorICSlot CallRuntimeFeedbackSlot() { |
| - DCHECK(!HasCallRuntimeFeedbackSlot() || |
| - !callruntime_feedback_slot_.IsInvalid()); |
| - return callruntime_feedback_slot_; |
| + bool is_jsruntime() const { |
| + return function_->intrinsic_type == Runtime::CONTEXT; |
| } |
| static int num_ids() { return parent_num_ids() + 1; } |
| BailoutId CallId() { return BailoutId(local_id(0)); } |
| protected: |
| - CallRuntime(Zone* zone, const AstRawString* name, |
| - const Runtime::Function* function, |
| + CallRuntime(Zone* zone, const Runtime::Function* function, |
| ZoneList<Expression*>* arguments, int pos) |
| - : Expression(zone, pos), |
| - raw_name_(name), |
| - function_(function), |
| - arguments_(arguments), |
| - callruntime_feedback_slot_(FeedbackVectorICSlot::Invalid()) {} |
| + : Expression(zone, pos), function_(function), arguments_(arguments) {} |
| static int parent_num_ids() { return Expression::num_ids(); } |
| private: |
| int local_id(int n) const { return base_id() + parent_num_ids() + n; } |
| - const AstRawString* raw_name_; |
| const Runtime::Function* function_; |
|
Michael Starzinger
2015/08/25 18:12:09
If below comment is addressed then we would need t
|
| ZoneList<Expression*>* arguments_; |
| - FeedbackVectorICSlot callruntime_feedback_slot_; |
| }; |
| @@ -3509,11 +3484,15 @@ class AstNodeFactory final BASE_EMBEDDED { |
| return new (zone_) CallNew(zone_, expression, arguments, pos); |
| } |
| - CallRuntime* NewCallRuntime(const AstRawString* name, |
| - const Runtime::Function* function, |
| - ZoneList<Expression*>* arguments, |
| - int pos) { |
| - return new (zone_) CallRuntime(zone_, name, function, arguments, pos); |
| + CallRuntime* NewCallRuntime(Runtime::FunctionId id, |
| + ZoneList<Expression*>* arguments, int pos) { |
| + return new (zone_) |
| + CallRuntime(zone_, Runtime::FunctionForId(id), arguments, pos); |
| + } |
| + |
| + CallRuntime* NewCallRuntime(const Runtime::Function* function, |
| + ZoneList<Expression*>* arguments, int pos) { |
| + return new (zone_) CallRuntime(zone_, function, arguments, pos); |
| } |
| UnaryOperation* NewUnaryOperation(Token::Value op, |