| Index: runtime/vm/object.cc
|
| ===================================================================
|
| --- runtime/vm/object.cc (revision 40039)
|
| +++ runtime/vm/object.cc (working copy)
|
| @@ -10698,7 +10698,7 @@
|
| // PC. StackmapTableBuilder::FinalizeStackmaps will replace it with the pc
|
| // address.
|
| ASSERT(pc_offset >= 0);
|
| - result.SetPC(pc_offset);
|
| + result.SetPcOffset(pc_offset);
|
| for (intptr_t i = 0; i < length; ++i) {
|
| result.SetBit(i, bmap->Get(i));
|
| }
|
| @@ -10712,7 +10712,7 @@
|
| return "{null}";
|
| } else {
|
| const char* kFormat = "%#" Px ": ";
|
| - intptr_t fixed_length = OS::SNPrint(NULL, 0, kFormat, PC()) + 1;
|
| + intptr_t fixed_length = OS::SNPrint(NULL, 0, kFormat, PcOffset()) + 1;
|
| Isolate* isolate = Isolate::Current();
|
| // Guard against integer overflow in the computation of alloc_size.
|
| //
|
| @@ -10723,7 +10723,7 @@
|
| }
|
| intptr_t alloc_size = fixed_length + Length();
|
| char* chars = isolate->current_zone()->Alloc<char>(alloc_size);
|
| - intptr_t index = OS::SNPrint(chars, alloc_size, kFormat, PC());
|
| + intptr_t index = OS::SNPrint(chars, alloc_size, kFormat, PcOffset());
|
| for (intptr_t i = 0; i < Length(); i++) {
|
| chars[index++] = IsObject(i) ? '1' : '0';
|
| }
|
| @@ -10794,35 +10794,37 @@
|
| intptr_t i,
|
| const String& var_name,
|
| const RawLocalVarDescriptors::VarInfo& info) {
|
| - if (info.kind == RawLocalVarDescriptors::kContextLevel) {
|
| + const int8_t kind = info.kind();
|
| + const int32_t index = info.index();
|
| + 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());
|
| @@ -10886,11 +10888,11 @@
|
| GetInfo(i, &info);
|
| JSONObject var(&members);
|
| var.AddProperty("name", var_name.ToCString());
|
| - var.AddProperty("index", info.index);
|
| - var.AddProperty("beginPos", info.begin_pos);
|
| - var.AddProperty("endPos", info.end_pos);
|
| + var.AddProperty("index", static_cast<intptr_t>(info.index()));
|
| + var.AddProperty("beginPos", static_cast<intptr_t>(info.begin_pos));
|
| + var.AddProperty("endPos", static_cast<intptr_t>(info.end_pos));
|
| var.AddProperty("scopeId", static_cast<intptr_t>(info.scope_id));
|
| - var.AddProperty("kind", KindToStr(info.kind));
|
| + var.AddProperty("kind", KindToStr(info.kind()));
|
| }
|
| }
|
|
|
| @@ -10917,8 +10919,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();
|
| {
|
| @@ -12394,7 +12397,8 @@
|
| }
|
|
|
|
|
| -RawStackmap* Code::GetStackmap(uword pc, Array* maps, Stackmap* map) const {
|
| +RawStackmap* Code::GetStackmap(
|
| + uint32_t pc_offset, Array* maps, Stackmap* map) const {
|
| // This code is used during iterating frames during a GC and hence it
|
| // should not in turn start a GC.
|
| NoGCScope no_gc;
|
| @@ -12410,7 +12414,7 @@
|
| for (intptr_t i = 0; i < maps->Length(); i++) {
|
| *map ^= maps->At(i);
|
| ASSERT(!map->IsNull());
|
| - if (map->PC() == pc) {
|
| + if (map->PcOffset() == pc_offset) {
|
| return map->raw(); // We found a stack map for this frame.
|
| }
|
| }
|
| @@ -19462,7 +19466,7 @@
|
|
|
|
|
| const char* JSRegExp::Flags() const {
|
| - switch (raw_ptr()->flags_) {
|
| + switch (flags()) {
|
| case kGlobal | kIgnoreCase | kMultiLine :
|
| case kIgnoreCase | kMultiLine :
|
| return "im";
|
|
|