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"; |