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

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

Issue 922603002: Fix another missing source location VM stacktrace with async code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: only record token position at instance call 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 | 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 AwaitMarkerNode* await_marker = new (Z) AwaitMarkerNode(); 180 AwaitMarkerNode* await_marker = new (Z) AwaitMarkerNode();
181 await_marker->set_scope(preamble_->scope()); 181 await_marker->set_scope(preamble_->scope());
182 preamble_->Add(await_marker); 182 preamble_->Add(await_marker);
183 ArgumentListNode* args = new(Z) ArgumentListNode(Scanner::kNoSourcePos); 183 ArgumentListNode* args = new(Z) ArgumentListNode(Scanner::kNoSourcePos);
184 184
185 args->Add(new(Z) LoadLocalNode(Scanner::kNoSourcePos, async_op)); 185 args->Add(new(Z) LoadLocalNode(Scanner::kNoSourcePos, async_op));
186 preamble_->Add(new (Z) StoreLocalNode( 186 preamble_->Add(new (Z) StoreLocalNode(
187 Scanner::kNoSourcePos, 187 Scanner::kNoSourcePos,
188 result_param, 188 result_param,
189 new(Z) InstanceCallNode(Scanner::kNoSourcePos, 189 new(Z) InstanceCallNode(node->token_pos(),
190 load_result_param, 190 load_result_param,
191 Symbols::FutureThen(), 191 Symbols::FutureThen(),
192 args))); 192 args)));
193 const Library& core_lib = Library::Handle(Library::CoreLibrary()); 193 const Library& core_lib = Library::Handle(Library::CoreLibrary());
194 const Function& async_catch_helper = Function::ZoneHandle( 194 const Function& async_catch_helper = Function::ZoneHandle(
195 Z, core_lib.LookupFunctionAllowPrivate(Symbols::AsyncCatchHelper())); 195 Z, core_lib.LookupFunctionAllowPrivate(Symbols::AsyncCatchHelper()));
196 ASSERT(!async_catch_helper.IsNull()); 196 ASSERT(!async_catch_helper.IsNull());
197 ArgumentListNode* catch_helper_args = new (Z) ArgumentListNode( 197 ArgumentListNode* catch_helper_args = new (Z) ArgumentListNode(
198 Scanner::kNoSourcePos); 198 Scanner::kNoSourcePos);
199 InstanceGetterNode* catch_error_getter = new (Z) InstanceGetterNode( 199 InstanceGetterNode* catch_error_getter = new (Z) InstanceGetterNode(
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 void AwaitTransformer::VisitThrowNode(ThrowNode* node) { 599 void AwaitTransformer::VisitThrowNode(ThrowNode* node) {
600 // TODO(mlippautz): Check if relevant. 600 // TODO(mlippautz): Check if relevant.
601 AstNode* new_exception = Transform(node->exception()); 601 AstNode* new_exception = Transform(node->exception());
602 AstNode* new_stacktrace = Transform(node->stacktrace()); 602 AstNode* new_stacktrace = Transform(node->stacktrace());
603 result_ = new(Z) ThrowNode(node->token_pos(), 603 result_ = new(Z) ThrowNode(node->token_pos(),
604 new_exception, 604 new_exception,
605 new_stacktrace); 605 new_stacktrace);
606 } 606 }
607 607
608 } // namespace dart 608 } // 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