| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 4d643122d6564aa4e34fcfccc5ec4b737f273981..3757e0482d61572bf60995b869de2e1c45b4ed6e 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -11077,7 +11077,7 @@ void PcDescriptors::PrintHeaderString() {
|
|
|
| const char* PcDescriptors::ToCString() const {
|
| if (Length() == 0) {
|
| - return "No pc descriptors\n";
|
| + return "empty PcDescriptors\n";
|
| }
|
| // 4 bits per hex digit.
|
| const int addr_width = kBitsPerWord / 4;
|
| @@ -11406,6 +11406,9 @@ const char* LocalVarDescriptors::ToCString() const {
|
| if (IsNull()) {
|
| return "LocalVarDescriptors(NULL)";
|
| }
|
| + if (Length() == 0) {
|
| + return "empty LocalVarDescriptors";
|
| + }
|
| intptr_t len = 1; // Trailing '\0'.
|
| String& var_name = String::Handle();
|
| for (intptr_t i = 0; i < Length(); i++) {
|
| @@ -12341,6 +12344,22 @@ bool ICData::IsUsedAt(intptr_t i) const {
|
| }
|
|
|
|
|
| +RawICData* ICData::New() {
|
| + ICData& result = ICData::Handle();
|
| + {
|
| + // IC data objects are long living objects, allocate them in old generation.
|
| + RawObject* raw = Object::Allocate(ICData::kClassId,
|
| + ICData::InstanceSize(),
|
| + Heap::kOld);
|
| + NoSafepointScope no_safepoint;
|
| + result ^= raw;
|
| + }
|
| + result.set_deopt_id(Isolate::kNoDeoptId);
|
| + result.set_state_bits(0);
|
| + return result.raw();
|
| +}
|
| +
|
| +
|
| RawICData* ICData::New(const Function& owner,
|
| const String& target_name,
|
| const Array& arguments_descriptor,
|
| @@ -13094,11 +13113,13 @@ intptr_t Code::GetDeoptIdForOsr(uword pc) const {
|
|
|
|
|
| const char* Code::ToCString() const {
|
| - const char* kFormat = "Code entry:%p";
|
| - intptr_t len = OS::SNPrint(NULL, 0, kFormat, EntryPoint()) + 1;
|
| - char* chars = Thread::Current()->zone()->Alloc<char>(len);
|
| - OS::SNPrint(chars, len, kFormat, EntryPoint());
|
| - return chars;
|
| + Zone* zone = Thread::Current()->zone();
|
| + if (IsStubCode()) {
|
| + const char* name = StubCode::NameOfStub(EntryPoint());
|
| + return zone->PrintToString("[stub: %s]", name);
|
| + } else {
|
| + return zone->PrintToString("Code entry:%" Px, EntryPoint());
|
| + }
|
| }
|
|
|
|
|
|
|