| 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 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2021 callruntime_feedback_slot_ = slot; | 2021 callruntime_feedback_slot_ = slot; |
| 2022 } | 2022 } |
| 2023 Code::Kind FeedbackICSlotKind(int index) override { return Code::LOAD_IC; } | 2023 Code::Kind FeedbackICSlotKind(int index) override { return Code::LOAD_IC; } |
| 2024 | 2024 |
| 2025 FeedbackVectorICSlot CallRuntimeFeedbackSlot() { | 2025 FeedbackVectorICSlot CallRuntimeFeedbackSlot() { |
| 2026 DCHECK(!HasCallRuntimeFeedbackSlot() || | 2026 DCHECK(!HasCallRuntimeFeedbackSlot() || |
| 2027 !callruntime_feedback_slot_.IsInvalid()); | 2027 !callruntime_feedback_slot_.IsInvalid()); |
| 2028 return callruntime_feedback_slot_; | 2028 return callruntime_feedback_slot_; |
| 2029 } | 2029 } |
| 2030 | 2030 |
| 2031 static int num_ids() { return parent_num_ids(); } | 2031 static int num_ids() { return parent_num_ids() + 1; } |
| 2032 BailoutId CallId() { return BailoutId(local_id(0)); } |
| 2032 | 2033 |
| 2033 protected: | 2034 protected: |
| 2034 CallRuntime(Zone* zone, const AstRawString* name, | 2035 CallRuntime(Zone* zone, const AstRawString* name, |
| 2035 const Runtime::Function* function, | 2036 const Runtime::Function* function, |
| 2036 ZoneList<Expression*>* arguments, int pos) | 2037 ZoneList<Expression*>* arguments, int pos) |
| 2037 : Expression(zone, pos), | 2038 : Expression(zone, pos), |
| 2038 raw_name_(name), | 2039 raw_name_(name), |
| 2039 function_(function), | 2040 function_(function), |
| 2040 arguments_(arguments), | 2041 arguments_(arguments), |
| 2041 callruntime_feedback_slot_(FeedbackVectorICSlot::Invalid()) {} | 2042 callruntime_feedback_slot_(FeedbackVectorICSlot::Invalid()) {} |
| 2042 static int parent_num_ids() { return Expression::num_ids(); } | 2043 static int parent_num_ids() { return Expression::num_ids(); } |
| 2043 | 2044 |
| 2044 private: | 2045 private: |
| 2046 int local_id(int n) const { return base_id() + parent_num_ids() + n; } |
| 2047 |
| 2045 const AstRawString* raw_name_; | 2048 const AstRawString* raw_name_; |
| 2046 const Runtime::Function* function_; | 2049 const Runtime::Function* function_; |
| 2047 ZoneList<Expression*>* arguments_; | 2050 ZoneList<Expression*>* arguments_; |
| 2048 FeedbackVectorICSlot callruntime_feedback_slot_; | 2051 FeedbackVectorICSlot callruntime_feedback_slot_; |
| 2049 }; | 2052 }; |
| 2050 | 2053 |
| 2051 | 2054 |
| 2052 class UnaryOperation final : public Expression { | 2055 class UnaryOperation final : public Expression { |
| 2053 public: | 2056 public: |
| 2054 DECLARE_NODE_TYPE(UnaryOperation) | 2057 DECLARE_NODE_TYPE(UnaryOperation) |
| (...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3604 | 3607 |
| 3605 private: | 3608 private: |
| 3606 Zone* zone_; | 3609 Zone* zone_; |
| 3607 AstValueFactory* ast_value_factory_; | 3610 AstValueFactory* ast_value_factory_; |
| 3608 }; | 3611 }; |
| 3609 | 3612 |
| 3610 | 3613 |
| 3611 } } // namespace v8::internal | 3614 } } // namespace v8::internal |
| 3612 | 3615 |
| 3613 #endif // V8_AST_H_ | 3616 #endif // V8_AST_H_ |
| OLD | NEW |