| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/parser.h" | 5 #include "vm/parser.h" |
| 6 #include "vm/flags.h" | 6 #include "vm/flags.h" |
| 7 | 7 |
| 8 #ifndef DART_PRECOMPILED_RUNTIME | 8 #ifndef DART_PRECOMPILED_RUNTIME |
| 9 | 9 |
| 10 #include "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| (...skipping 7349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7360 current_block_->scope->LookupVariable(Symbols::AsyncOperation(), false); | 7360 current_block_->scope->LookupVariable(Symbols::AsyncOperation(), false); |
| 7361 ClosureNode* closure_obj = new (Z) ClosureNode( | 7361 ClosureNode* closure_obj = new (Z) ClosureNode( |
| 7362 TokenPosition::kNoSource, closure_func, NULL, closure_body->scope()); | 7362 TokenPosition::kNoSource, closure_func, NULL, closure_body->scope()); |
| 7363 StoreLocalNode* store_async_op = new (Z) | 7363 StoreLocalNode* store_async_op = new (Z) |
| 7364 StoreLocalNode(TokenPosition::kNoSource, async_op_var, closure_obj); | 7364 StoreLocalNode(TokenPosition::kNoSource, async_op_var, closure_obj); |
| 7365 | 7365 |
| 7366 current_block_->statements->Add(store_async_op); | 7366 current_block_->statements->Add(store_async_op); |
| 7367 | 7367 |
| 7368 if (FLAG_causal_async_stacks) { | 7368 if (FLAG_causal_async_stacks) { |
| 7369 // Add to AST: | 7369 // Add to AST: |
| 7370 // :async_stack_trace = _asyncStackTraceHelper(:async_op); | 7370 // :async_stack_trace = _asyncStackTraceHelper(); |
| 7371 const Function& async_stack_trace_helper = Function::ZoneHandle( | 7371 const Function& async_stack_trace_helper = Function::ZoneHandle( |
| 7372 Z, | 7372 Z, |
| 7373 async_lib.LookupFunctionAllowPrivate(Symbols::AsyncStackTraceHelper())); | 7373 async_lib.LookupFunctionAllowPrivate(Symbols::AsyncStackTraceHelper())); |
| 7374 ASSERT(!async_stack_trace_helper.IsNull()); | 7374 ASSERT(!async_stack_trace_helper.IsNull()); |
| 7375 ArgumentListNode* async_stack_trace_helper_args = | 7375 ArgumentListNode* async_stack_trace_helper_args = |
| 7376 new (Z) ArgumentListNode(TokenPosition::kNoSource); | 7376 new (Z) ArgumentListNode(TokenPosition::kNoSource); |
| 7377 async_stack_trace_helper_args->Add( | 7377 async_stack_trace_helper_args->Add( |
| 7378 new (Z) LoadLocalNode(TokenPosition::kNoSource, async_op_var)); | 7378 new (Z) LoadLocalNode(TokenPosition::kNoSource, async_op_var)); |
| 7379 StaticCallNode* async_stack_trace_helper_call = new (Z) StaticCallNode( | 7379 StaticCallNode* async_stack_trace_helper_call = new (Z) StaticCallNode( |
| 7380 token_pos, async_stack_trace_helper, async_stack_trace_helper_args); | 7380 token_pos, async_stack_trace_helper, async_stack_trace_helper_args); |
| (...skipping 7932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15313 TokenPosition* start, | 15313 TokenPosition* start, |
| 15314 TokenPosition* end) { | 15314 TokenPosition* end) { |
| 15315 UNREACHABLE(); | 15315 UNREACHABLE(); |
| 15316 return false; | 15316 return false; |
| 15317 } | 15317 } |
| 15318 | 15318 |
| 15319 | 15319 |
| 15320 } // namespace dart | 15320 } // namespace dart |
| 15321 | 15321 |
| 15322 #endif // DART_PRECOMPILED_RUNTIME | 15322 #endif // DART_PRECOMPILED_RUNTIME |
| OLD | NEW |