Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(815)

Side by Side Diff: src/ast.h

Issue 929733003: for-of should throw if result object is not an object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add strings and move runtime function Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/ast-value-factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | src/ast-value-factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698