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

Unified Diff: runtime/vm/object.cc

Issue 343803002: Finishes removing intptr_t from raw object fields. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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
===================================================================
--- runtime/vm/object.cc (revision 37878)
+++ runtime/vm/object.cc (working copy)
@@ -10471,35 +10471,39 @@
intptr_t i,
const String& var_name,
const RawLocalVarDescriptors::VarInfo& info) {
- if (info.kind == RawLocalVarDescriptors::kContextLevel) {
+ const int8_t kind =
+ RawLocalVarDescriptors::KindBits::decode(info.index_kind);
+ const int32_t index =
+ RawLocalVarDescriptors::IndexBits::decode(info.index_kind);
+ if (kind == RawLocalVarDescriptors::kContextLevel) {
return OS::SNPrint(buffer, len,
- "%2" Pd " %-13s level=%-3" Pd " scope=%-3d"
- " begin=%-3" Pd " end=%" Pd "\n",
+ "%2" Pd " %-13s level=%-3d scope=%-3d"
+ " begin=%-3d end=%d\n",
i,
- VarKindString(info.kind),
- info.index,
+ VarKindString(kind),
+ index,
info.scope_id,
info.begin_pos,
info.end_pos);
- } else if (info.kind == RawLocalVarDescriptors::kContextVar) {
+ } else if (kind == RawLocalVarDescriptors::kContextVar) {
return OS::SNPrint(buffer, len,
- "%2" Pd " %-13s level=%-3d index=%-3" Pd ""
- " begin=%-3" Pd " end=%-3" Pd " name=%s\n",
+ "%2" Pd " %-13s level=%-3d index=%-3d"
+ " begin=%-3d end=%-3d name=%s\n",
i,
- VarKindString(info.kind),
+ VarKindString(kind),
info.scope_id,
- info.index,
+ index,
info.begin_pos,
info.end_pos,
var_name.ToCString());
} else {
return OS::SNPrint(buffer, len,
- "%2" Pd " %-13s scope=%-3d index=%-3" Pd ""
- " begin=%-3" Pd " end=%-3" Pd " name=%s\n",
+ "%2" Pd " %-13s scope=%-3d index=%-3d"
+ " begin=%-3d end=%-3d name=%s\n",
i,
- VarKindString(info.kind),
+ VarKindString(kind),
info.scope_id,
- info.index,
+ index,
info.begin_pos,
info.end_pos,
var_name.ToCString());
@@ -10550,8 +10554,9 @@
ASSERT(Object::var_descriptors_class() != Class::null());
if (num_variables < 0 || num_variables > kMaxElements) {
// This should be caught before we reach here.
- FATAL1("Fatal error in LocalVarDescriptors::New: "
- "invalid num_variables %" Pd "\n", num_variables);
+ FATAL2("Fatal error in LocalVarDescriptors::New: "
+ "invalid num_variables %" Pd ". Maximum is: %d\n",
+ num_variables, RawLocalVarDescriptors::kMaxIndex);
}
LocalVarDescriptors& result = LocalVarDescriptors::Handle();
{
@@ -18757,7 +18762,7 @@
const char* JSRegExp::Flags() const {
- switch (raw_ptr()->flags_) {
+ switch (flags()) {
case kGlobal | kIgnoreCase | kMultiLine :
case kIgnoreCase | kMultiLine :
return "im";
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698