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

Side by Side Diff: src/ast.h

Issue 348893007: Allow yield expressions without a RHS. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update tests, fix function* () { yield* } Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/preparser.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 3350 matching lines...) Expand 10 before | Expand all | Expand 10 after
3361 Assignment* assign = 3361 Assignment* assign =
3362 new(zone_) Assignment(zone_, op, target, value, pos); 3362 new(zone_) Assignment(zone_, op, target, value, pos);
3363 assign->Init(zone_, this); 3363 assign->Init(zone_, this);
3364 VISIT_AND_RETURN(Assignment, assign) 3364 VISIT_AND_RETURN(Assignment, assign)
3365 } 3365 }
3366 3366
3367 Yield* NewYield(Expression *generator_object, 3367 Yield* NewYield(Expression *generator_object,
3368 Expression* expression, 3368 Expression* expression,
3369 Yield::Kind yield_kind, 3369 Yield::Kind yield_kind,
3370 int pos) { 3370 int pos) {
3371 if (!expression) expression = NewUndefinedLiteral(pos);
3371 Yield* yield = new(zone_) Yield( 3372 Yield* yield = new(zone_) Yield(
3372 zone_, generator_object, expression, yield_kind, pos); 3373 zone_, generator_object, expression, yield_kind, pos);
3373 VISIT_AND_RETURN(Yield, yield) 3374 VISIT_AND_RETURN(Yield, yield)
3374 } 3375 }
3375 3376
3376 Throw* NewThrow(Expression* exception, int pos) { 3377 Throw* NewThrow(Expression* exception, int pos) {
3377 Throw* t = new(zone_) Throw(zone_, exception, pos); 3378 Throw* t = new(zone_) Throw(zone_, exception, pos);
3378 VISIT_AND_RETURN(Throw, t) 3379 VISIT_AND_RETURN(Throw, t)
3379 } 3380 }
3380 3381
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
3423 private: 3424 private:
3424 Zone* zone_; 3425 Zone* zone_;
3425 Visitor visitor_; 3426 Visitor visitor_;
3426 AstValueFactory* ast_value_factory_; 3427 AstValueFactory* ast_value_factory_;
3427 }; 3428 };
3428 3429
3429 3430
3430 } } // namespace v8::internal 3431 } } // namespace v8::internal
3431 3432
3432 #endif // V8_AST_H_ 3433 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698