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_AST_H_ | 5 #ifndef V8_AST_AST_H_ |
6 #define V8_AST_AST_H_ | 6 #define V8_AST_AST_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/ast/ast-types.h" | 9 #include "src/ast/ast-types.h" |
10 #include "src/ast/ast-value-factory.h" | 10 #include "src/ast/ast-value-factory.h" |
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 void set_key(Expression* e) { key_ = e; } | 1321 void set_key(Expression* e) { key_ = e; } |
1322 void set_value(Expression* e) { value_ = e; } | 1322 void set_value(Expression* e) { value_ = e; } |
1323 | 1323 |
1324 bool is_computed_name() const { return is_computed_name_; } | 1324 bool is_computed_name() const { return is_computed_name_; } |
1325 | 1325 |
1326 FeedbackVectorSlot GetSlot(int offset = 0) const { | 1326 FeedbackVectorSlot GetSlot(int offset = 0) const { |
1327 DCHECK_LT(offset, static_cast<int>(arraysize(slots_))); | 1327 DCHECK_LT(offset, static_cast<int>(arraysize(slots_))); |
1328 return slots_[offset]; | 1328 return slots_[offset]; |
1329 } | 1329 } |
1330 | 1330 |
| 1331 FeedbackVectorSlot GetStoreDataPropertySlot() const; |
| 1332 |
1331 void SetSlot(FeedbackVectorSlot slot, int offset = 0) { | 1333 void SetSlot(FeedbackVectorSlot slot, int offset = 0) { |
1332 DCHECK_LT(offset, static_cast<int>(arraysize(slots_))); | 1334 DCHECK_LT(offset, static_cast<int>(arraysize(slots_))); |
1333 slots_[offset] = slot; | 1335 slots_[offset] = slot; |
1334 } | 1336 } |
1335 | 1337 |
| 1338 void SetStoreDataPropertySlot(FeedbackVectorSlot slot); |
| 1339 |
1336 bool NeedsSetFunctionName() const; | 1340 bool NeedsSetFunctionName() const; |
1337 | 1341 |
1338 protected: | 1342 protected: |
1339 LiteralProperty(Expression* key, Expression* value, bool is_computed_name) | 1343 LiteralProperty(Expression* key, Expression* value, bool is_computed_name) |
1340 : key_(key), value_(value), is_computed_name_(is_computed_name) {} | 1344 : key_(key), value_(value), is_computed_name_(is_computed_name) {} |
1341 | 1345 |
1342 Expression* key_; | 1346 Expression* key_; |
1343 Expression* value_; | 1347 Expression* value_; |
1344 FeedbackVectorSlot slots_[2]; | 1348 FeedbackVectorSlot slots_[2]; |
1345 bool is_computed_name_; | 1349 bool is_computed_name_; |
(...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3604 : NULL; \ | 3608 : NULL; \ |
3605 } | 3609 } |
3606 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) | 3610 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) |
3607 #undef DECLARE_NODE_FUNCTIONS | 3611 #undef DECLARE_NODE_FUNCTIONS |
3608 | 3612 |
3609 | 3613 |
3610 } // namespace internal | 3614 } // namespace internal |
3611 } // namespace v8 | 3615 } // namespace v8 |
3612 | 3616 |
3613 #endif // V8_AST_AST_H_ | 3617 #endif // V8_AST_AST_H_ |
OLD | NEW |