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

Side by Side Diff: runtime/vm/ast_transformer.cc

Issue 973503003: Fix VM crash when parsing await throw (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/ast_transformer.h" 5 #include "vm/ast_transformer.h"
6 6
7 #include "vm/object_store.h" 7 #include "vm/object_store.h"
8 #include "vm/parser.h" 8 #include "vm/parser.h"
9 #include "vm/thread.h" 9 #include "vm/thread.h"
10 10
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 // TODO(mlippautz): Check initializers and their temps. 615 // TODO(mlippautz): Check initializers and their temps.
616 LetNode* result = new(Z) LetNode(node->token_pos()); 616 LetNode* result = new(Z) LetNode(node->token_pos());
617 for (intptr_t i = 0; i < node->nodes().length(); i++) { 617 for (intptr_t i = 0; i < node->nodes().length(); i++) {
618 result->AddNode(Transform(node->nodes()[i])); 618 result->AddNode(Transform(node->nodes()[i]));
619 } 619 }
620 result_ = result; 620 result_ = result;
621 } 621 }
622 622
623 623
624 void AwaitTransformer::VisitThrowNode(ThrowNode* node) { 624 void AwaitTransformer::VisitThrowNode(ThrowNode* node) {
625 // TODO(mlippautz): Check if relevant.
626 AstNode* new_exception = Transform(node->exception()); 625 AstNode* new_exception = Transform(node->exception());
627 AstNode* new_stacktrace = Transform(node->stacktrace());
628 result_ = new(Z) ThrowNode(node->token_pos(), 626 result_ = new(Z) ThrowNode(node->token_pos(),
629 new_exception, 627 new_exception,
630 new_stacktrace); 628 node->stacktrace());
631 } 629 }
632 630
633 } // namespace dart 631 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698