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

Unified Diff: vm/object.cc

Issue 10831248: 1. Write out only the kind_tag_ field of a function in the snapshot instead of the individual bits … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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 | « vm/object.h ('k') | vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object.cc
===================================================================
--- vm/object.cc (revision 10450)
+++ vm/object.cc (working copy)
@@ -3614,22 +3614,26 @@
void Function::set_kind(RawFunction::Kind value) const {
- raw()->SetKind(value);
+ uword bits = raw_ptr()->kind_tag_;
+ raw_ptr()->kind_tag_ = KindBits::update(value, bits);
}
void Function::set_is_static(bool is_static) const {
- raw()->SetIsStatic(is_static);
+ uword bits = raw_ptr()->kind_tag_;
+ raw_ptr()->kind_tag_ = StaticBit::update(is_static, bits);
}
void Function::set_is_const(bool is_const) const {
- raw()->SetIsConst(is_const);
+ uword bits = raw_ptr()->kind_tag_;
+ raw_ptr()->kind_tag_ = ConstBit::update(is_const, bits);
}
void Function::set_is_external(bool is_external) const {
- raw()->SetIsExternal(is_external);
+ uword bits = raw_ptr()->kind_tag_;
+ raw_ptr()->kind_tag_ = ExternalBit::update(is_external, bits);
}
@@ -3639,6 +3643,11 @@
}
+void Function::set_kind_tag(intptr_t value) const {
+ raw_ptr()->kind_tag_ = value;
+}
+
+
void Function::set_num_fixed_parameters(intptr_t n) const {
ASSERT(n >= 0);
raw_ptr()->num_fixed_parameters_ = n;
@@ -3652,22 +3661,26 @@
void Function::set_is_optimizable(bool value) const {
- raw()->SetIsOptimizable(value);
+ uword bits = raw_ptr()->kind_tag_;
+ raw_ptr()->kind_tag_ = OptimizableBit::update(value, bits);
}
void Function::set_has_finally(bool value) const {
- raw()->SetHasFinally(value);
+ uword bits = raw_ptr()->kind_tag_;
+ raw_ptr()->kind_tag_ = HasFinallyBit::update(value, bits);
}
void Function::set_is_native(bool value) const {
- raw()->SetIsNative(value);
+ uword bits = raw_ptr()->kind_tag_;
+ raw_ptr()->kind_tag_ = NativeBit::update(value, bits);
}
void Function::set_is_abstract(bool value) const {
- raw()->SetIsAbstract(value);
+ uword bits = raw_ptr()->kind_tag_;
+ raw_ptr()->kind_tag_ = AbstractBit::update(value, bits);
}
« no previous file with comments | « vm/object.h ('k') | vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698