| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 Expression* result_done() const { | 972 Expression* result_done() const { |
| 973 return result_done_; | 973 return result_done_; |
| 974 } | 974 } |
| 975 | 975 |
| 976 // each = result.value | 976 // each = result.value |
| 977 Expression* assign_each() const { | 977 Expression* assign_each() const { |
| 978 return assign_each_; | 978 return assign_each_; |
| 979 } | 979 } |
| 980 | 980 |
| 981 virtual BailoutId ContinueId() const { return EntryId(); } | 981 virtual BailoutId ContinueId() const { return EntryId(); } |
| 982 virtual BailoutId StackCheckId() const { return BackEdgeId(); } | 982 virtual BailoutId StackCheckId() const { return BodyId(); } |
| 983 | 983 |
| 984 BailoutId BackEdgeId() const { return back_edge_id_; } | 984 BailoutId BodyId() const { return body_id_; } |
| 985 | 985 |
| 986 protected: | 986 protected: |
| 987 ForOfStatement(Isolate* isolate, ZoneStringList* labels) | 987 ForOfStatement(Isolate* isolate, ZoneStringList* labels) |
| 988 : ForEachStatement(isolate, labels), | 988 : ForEachStatement(isolate, labels), |
| 989 assign_iterator_(NULL), | 989 assign_iterator_(NULL), |
| 990 next_result_(NULL), | 990 next_result_(NULL), |
| 991 result_done_(NULL), | 991 result_done_(NULL), |
| 992 assign_each_(NULL), | 992 assign_each_(NULL), |
| 993 back_edge_id_(GetNextId(isolate)) { | 993 body_id_(GetNextId(isolate)) { |
| 994 } | 994 } |
| 995 | 995 |
| 996 Expression* assign_iterator_; | 996 Expression* assign_iterator_; |
| 997 Expression* next_result_; | 997 Expression* next_result_; |
| 998 Expression* result_done_; | 998 Expression* result_done_; |
| 999 Expression* assign_each_; | 999 Expression* assign_each_; |
| 1000 const BailoutId back_edge_id_; | 1000 const BailoutId body_id_; |
| 1001 }; | 1001 }; |
| 1002 | 1002 |
| 1003 | 1003 |
| 1004 class ExpressionStatement: public Statement { | 1004 class ExpressionStatement: public Statement { |
| 1005 public: | 1005 public: |
| 1006 DECLARE_NODE_TYPE(ExpressionStatement) | 1006 DECLARE_NODE_TYPE(ExpressionStatement) |
| 1007 | 1007 |
| 1008 void set_expression(Expression* e) { expression_ = e; } | 1008 void set_expression(Expression* e) { expression_ = e; } |
| 1009 Expression* expression() const { return expression_; } | 1009 Expression* expression() const { return expression_; } |
| 1010 | 1010 |
| (...skipping 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3226 private: | 3226 private: |
| 3227 Isolate* isolate_; | 3227 Isolate* isolate_; |
| 3228 Zone* zone_; | 3228 Zone* zone_; |
| 3229 Visitor visitor_; | 3229 Visitor visitor_; |
| 3230 }; | 3230 }; |
| 3231 | 3231 |
| 3232 | 3232 |
| 3233 } } // namespace v8::internal | 3233 } } // namespace v8::internal |
| 3234 | 3234 |
| 3235 #endif // V8_AST_H_ | 3235 #endif // V8_AST_H_ |
| OLD | NEW |