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

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

Issue 2690873005: Enable causal stacktrace in kernel (Closed)
Patch Set: Change kernel function 'debuggable' field to an 'originalAsyncMarker' field, use it to set function… 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 "vm/kernel_reader.h" 5 #include "vm/kernel_reader.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 dart::Function& function = dart::Function::ZoneHandle( 420 dart::Function& function = dart::Function::ZoneHandle(
421 Z, Function::New(name, GetFunctionType(kernel_procedure), 421 Z, Function::New(name, GetFunctionType(kernel_procedure),
422 !is_method, // is_static 422 !is_method, // is_static
423 false, // is_const 423 false, // is_const
424 is_abstract, is_external, 424 is_abstract, is_external,
425 native_name != NULL, // is_native 425 native_name != NULL, // is_native
426 script_class, kernel_procedure->position())); 426 script_class, kernel_procedure->position()));
427 function.set_end_token_pos(kernel_procedure->end_position()); 427 function.set_end_token_pos(kernel_procedure->end_position());
428 owner.AddFunction(function); 428 owner.AddFunction(function);
429 function.set_kernel_function(kernel_procedure); 429 function.set_kernel_function(kernel_procedure);
430 function.set_is_debuggable(kernel_procedure->function()->debuggable()); 430 function.set_is_debuggable(
431 kernel_procedure->function()->original_async_marker() ==
432 FunctionNode::kSync);
433 switch (kernel_procedure->function()->original_async_marker()) {
434 case FunctionNode::kSyncStar:
435 function.set_modifier(RawFunction::kSyncGen);
436 break;
437 case FunctionNode::kAsync:
438 function.set_modifier(RawFunction::kAsync);
439 break;
440 case FunctionNode::kAsyncStar:
441 function.set_modifier(RawFunction::kAsyncGen);
442 break;
443 default:
444 // no special modifier
445 break;
446 }
431 if (native_name != NULL) { 447 if (native_name != NULL) {
432 function.set_native_name(*native_name); 448 function.set_native_name(*native_name);
433 } 449 }
434 450
435 SetupFunctionParameters(H, T, owner, function, kernel_procedure->function(), 451 SetupFunctionParameters(H, T, owner, function, kernel_procedure->function(),
436 is_method, 452 is_method,
437 false); // is_closure 453 false); // is_closure
438 454
439 if (kernel_klass == NULL) { 455 if (kernel_klass == NULL) {
440 library.AddObject(function, name); 456 library.AddObject(function, name);
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 initializer_fun.set_is_debuggable(false); 814 initializer_fun.set_is_debuggable(false);
799 initializer_fun.set_is_reflectable(false); 815 initializer_fun.set_is_reflectable(false);
800 initializer_fun.set_is_inlinable(false); 816 initializer_fun.set_is_inlinable(false);
801 return new (zone) ParsedFunction(thread, initializer_fun); 817 return new (zone) ParsedFunction(thread, initializer_fun);
802 } 818 }
803 819
804 820
805 } // namespace kernel 821 } // namespace kernel
806 } // namespace dart 822 } // namespace dart
807 #endif // !defined(DART_PRECOMPILED_RUNTIME) 823 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698