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

Unified Diff: runtime/vm/object.cc

Issue 888463004: Add support for sync* and yield (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 43515)
+++ runtime/vm/object.cc (working copy)
@@ -5584,7 +5584,7 @@
bool Function::CanBeInlined() const {
return is_inlinable() &&
- !is_async_closure() &&
+ !is_generated_body() &&
HasCode() &&
!Isolate::Current()->debugger()->HasBreakpoint(*this);
}
@@ -6111,7 +6111,7 @@
result.set_is_debuggable(true); // Will be computed later.
result.set_is_intrinsic(false);
result.set_is_redirecting(false);
- result.set_is_async_closure(false);
+ result.set_is_generated_body(false);
result.set_always_inline(false);
result.set_is_polymorphic_target(false);
result.set_owner(owner);
@@ -12788,7 +12788,23 @@
const char* ContextScope::ToCString() const {
- return "ContextScope";
+ const char* format =
+ "%s\nvar %s token-pos %" Pd " ctx lvl %" Pd " index %" Pd "";
+ const char* prev_cstr = "ContextScope:";
+ String& name = String::Handle();
+ for (int i = 0; i < num_variables(); i++) {
+ name = NameAt(i);
+ const char* cname = name.ToCString();
+ intptr_t pos = TokenIndexAt(i);
+ intptr_t idx = ContextIndexAt(i);
+ intptr_t lvl = ContextLevelAt(i);
+ intptr_t len =
+ OS::SNPrint(NULL, 0, format, prev_cstr, cname, pos, lvl, idx) + 1;
+ char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
+ OS::SNPrint(chars, len, format, prev_cstr, cname, pos, lvl, idx);
+ prev_cstr = chars;
+ }
+ return prev_cstr;
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698