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

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

Issue 2697193008: [Kernel] replace function debuggable field with originalAsyncMarker field (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 8
9 #include "vm/kernel_to_il.h" 9 #include "vm/kernel_to_il.h"
10 10
(...skipping 6113 matching lines...) Expand 10 before | Expand all | Expand 10 after
6124 if (parent->IsFunctionExpression()) { 6124 if (parent->IsFunctionExpression()) {
6125 name = &Symbols::AnonymousClosure(); 6125 name = &Symbols::AnonymousClosure();
6126 } else { 6126 } else {
6127 ASSERT(parent->IsFunctionDeclaration()); 6127 ASSERT(parent->IsFunctionDeclaration());
6128 name = &H.DartSymbol( 6128 name = &H.DartSymbol(
6129 FunctionDeclaration::Cast(parent)->variable()->name()); 6129 FunctionDeclaration::Cast(parent)->variable()->name());
6130 } 6130 }
6131 // NOTE: This is not TokenPosition in the general sense! 6131 // NOTE: This is not TokenPosition in the general sense!
6132 function = Function::NewClosureFunction( 6132 function = Function::NewClosureFunction(
6133 *name, parsed_function_->function(), position); 6133 *name, parsed_function_->function(), position);
6134 function.set_is_debuggable(node->debuggable()); 6134 function.set_is_debuggable(node->original_async_marker() ==
6135 FunctionNode::kSync);
6135 function.set_end_token_pos(node->end_position()); 6136 function.set_end_token_pos(node->end_position());
6136 LocalScope* scope = scopes_->function_scopes[i].scope; 6137 LocalScope* scope = scopes_->function_scopes[i].scope;
6137 const ContextScope& context_scope = 6138 const ContextScope& context_scope =
6138 ContextScope::Handle(Z, scope->PreserveOuterScope(context_depth_)); 6139 ContextScope::Handle(Z, scope->PreserveOuterScope(context_depth_));
6139 function.set_context_scope(context_scope); 6140 function.set_context_scope(context_scope);
6140 function.set_kernel_function(node); 6141 function.set_kernel_function(node);
6141 KernelReader::SetupFunctionParameters(H, T, dart::Class::Handle(Z), 6142 KernelReader::SetupFunctionParameters(H, T, dart::Class::Handle(Z),
6142 function, node, 6143 function, node,
6143 false, // is_method 6144 false, // is_method
6144 true); // is_closure 6145 true); // is_closure
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
6280 thread->clear_sticky_error(); 6281 thread->clear_sticky_error();
6281 return error.raw(); 6282 return error.raw();
6282 } 6283 }
6283 } 6284 }
6284 6285
6285 6286
6286 } // namespace kernel 6287 } // namespace kernel
6287 } // namespace dart 6288 } // namespace dart
6288 6289
6289 #endif // !defined(DART_PRECOMPILED_RUNTIME) 6290 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« pkg/kernel/lib/text/ast_to_text.dart ('K') | « runtime/vm/kernel_reader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698