| Index: src/ast.h
|
| diff --git a/src/ast.h b/src/ast.h
|
| index 1366041387215bc4c018c4b1650d39ff5f6549c4..86ffab20c7b522f671a22630e95945c9765b4720 100644
|
| --- a/src/ast.h
|
| +++ b/src/ast.h
|
| @@ -2031,51 +2031,41 @@ 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);
|
| + int context_index() const {
|
| + DCHECK(is_jsruntime());
|
| + return context_index_;
|
| }
|
| - 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_;
|
| + const Runtime::Function* function() const {
|
| + DCHECK(!is_jsruntime());
|
| + return function_;
|
| }
|
|
|
| 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), function_(function), arguments_(arguments) {}
|
| +
|
| + CallRuntime(Zone* zone, int context_index, ZoneList<Expression*>* arguments,
|
| + int pos)
|
| : Expression(zone, pos),
|
| - raw_name_(name),
|
| - function_(function),
|
| - arguments_(arguments),
|
| - callruntime_feedback_slot_(FeedbackVectorICSlot::Invalid()) {}
|
| + function_(NULL),
|
| + context_index_(context_index),
|
| + 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_;
|
| + int context_index_;
|
| ZoneList<Expression*>* arguments_;
|
| - FeedbackVectorICSlot callruntime_feedback_slot_;
|
| };
|
|
|
|
|
| @@ -3509,11 +3499,20 @@ 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);
|
| + }
|
| +
|
| + CallRuntime* NewCallRuntime(int context_index,
|
| + ZoneList<Expression*>* arguments, int pos) {
|
| + return new (zone_) CallRuntime(zone_, context_index, arguments, pos);
|
| }
|
|
|
| UnaryOperation* NewUnaryOperation(Token::Value op,
|
|
|