| 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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 assign_iterator_ = assign_iterator; | 935 assign_iterator_ = assign_iterator; |
| 936 next_result_ = next_result; | 936 next_result_ = next_result; |
| 937 result_done_ = result_done; | 937 result_done_ = result_done; |
| 938 assign_each_ = assign_each; | 938 assign_each_ = assign_each; |
| 939 } | 939 } |
| 940 | 940 |
| 941 Expression* iterable() const { | 941 Expression* iterable() const { |
| 942 return subject(); | 942 return subject(); |
| 943 } | 943 } |
| 944 | 944 |
| 945 // var iterator = subject[Symbol.iterator](); | 945 // iterator = subject[Symbol.iterator]() |
| 946 Expression* assign_iterator() const { | 946 Expression* assign_iterator() const { |
| 947 return assign_iterator_; | 947 return assign_iterator_; |
| 948 } | 948 } |
| 949 | 949 |
| 950 // var result = iterator.next(); | 950 // result = iterator.next() // with type check |
| 951 Expression* next_result() const { | 951 Expression* next_result() const { |
| 952 return next_result_; | 952 return next_result_; |
| 953 } | 953 } |
| 954 | 954 |
| 955 // result.done | 955 // result.done |
| 956 Expression* result_done() const { | 956 Expression* result_done() const { |
| 957 return result_done_; | 957 return result_done_; |
| 958 } | 958 } |
| 959 | 959 |
| 960 // each = result.value | 960 // each = result.value |
| (...skipping 2529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3490 | 3490 |
| 3491 private: | 3491 private: |
| 3492 Zone* zone_; | 3492 Zone* zone_; |
| 3493 AstValueFactory* ast_value_factory_; | 3493 AstValueFactory* ast_value_factory_; |
| 3494 }; | 3494 }; |
| 3495 | 3495 |
| 3496 | 3496 |
| 3497 } } // namespace v8::internal | 3497 } } // namespace v8::internal |
| 3498 | 3498 |
| 3499 #endif // V8_AST_H_ | 3499 #endif // V8_AST_H_ |
| OLD | NEW |