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

Unified Diff: runtime/vm/object.cc

Issue 362153002: Transform functions marked as async (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index aa88d36e8641c6ffd19dc0caa31d679f3924ba4b..6a843a58f660493d71747aece735316140040c53 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -5425,6 +5425,11 @@ void Function::set_kind(RawFunction::Kind value) const {
}
+void Function::set_modifier(RawFunction::AsyncModifier value) const {
+ set_kind_tag(ModifierBits::update(value, raw_ptr()->kind_tag_));
+}
+
+
void Function::set_is_intrinsic(bool value) const {
set_kind_tag(IntrinsicBit::update(value, raw_ptr()->kind_tag_));
}
@@ -5455,6 +5460,11 @@ void Function::set_is_external(bool value) const {
}
+void Function::set_is_async_closure(bool value) const {
+ set_kind_tag(AsyncClosureBit::update(value, raw_ptr()->kind_tag_));
+}
+
+
void Function::set_token_pos(intptr_t value) const {
ASSERT(value >= 0);
raw_ptr()->token_pos_ = value;
@@ -5462,7 +5472,7 @@ void Function::set_token_pos(intptr_t value) const {
void Function::set_kind_tag(intptr_t value) const {
- raw_ptr()->kind_tag_ = static_cast<uint16_t>(value);
+ raw_ptr()->kind_tag_ = static_cast<uint32_t>(value);
}
@@ -6052,6 +6062,7 @@ RawFunction* Function::New(const String& name,
result.set_parameter_names(Object::empty_array());
result.set_name(name);
result.set_kind(kind);
+ result.set_modifier(RawFunction::kNoModifier);
result.set_is_static(is_static);
result.set_is_const(is_const);
result.set_is_abstract(is_abstract);
@@ -6061,6 +6072,7 @@ RawFunction* Function::New(const String& name,
result.set_is_intrinsic(false);
result.set_is_recognized(false);
result.set_is_redirecting(false);
+ result.set_is_async_closure(false);
result.set_owner(owner);
result.set_token_pos(token_pos);
result.set_end_token_pos(token_pos);

Powered by Google App Engine
This is Rietveld 408576698