| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 8fe6d6f34104adc2a8a6243d9d17f5fc0e0c51c1..0a664aaf5ac6267cd2aeb2fcf4e55113573e17eb 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -13329,7 +13329,6 @@ RawCode* Code::FinalizeCode(const char* name,
|
| INC_STAT(Thread::Current(), total_instr_size, assembler->CodeSize());
|
| INC_STAT(Thread::Current(), total_code_size, assembler->CodeSize());
|
|
|
| - instrs.set_code(code.raw());
|
| // Copy the instructions into the instruction area and apply all fixups.
|
| // Embedded pointers are still in handles at this point.
|
| MemoryRegion region(reinterpret_cast<void*>(instrs.EntryPoint()),
|
| @@ -13410,17 +13409,6 @@ RawCode* Code::FinalizeCode(const Function& function,
|
| }
|
|
|
|
|
| -// Check if object matches find condition.
|
| -bool Code::FindRawCodeVisitor::FindObject(RawObject* raw_obj) const {
|
| - uword tags = raw_obj->ptr()->tags_;
|
| - if (RawObject::ClassIdTag::decode(tags) == kInstructionsCid) {
|
| - RawInstructions* raw_insts = reinterpret_cast<RawInstructions*>(raw_obj);
|
| - return RawInstructions::ContainsPC(raw_insts, pc_);
|
| - }
|
| - return false;
|
| -}
|
| -
|
| -
|
| bool Code::SlowFindRawCodeVisitor::FindObject(RawObject* raw_obj) const {
|
| return RawCode::ContainsPC(raw_obj, pc_);
|
| }
|
| @@ -13432,24 +13420,12 @@ RawCode* Code::LookupCodeInIsolate(Isolate* isolate, uword pc) {
|
| return Code::null();
|
| }
|
| NoSafepointScope no_safepoint;
|
| - // TODO(johnmccutchan): Make lookup without a back pointer faster and use for
|
| - // both cases.
|
| - if (Dart::IsRunningPrecompiledCode()) {
|
| - SlowFindRawCodeVisitor visitor(pc);
|
| - RawObject* needle = isolate->heap()->FindOldObject(&visitor);
|
| - if (needle != Code::null()) {
|
| - return static_cast<RawCode*>(needle);
|
| - }
|
| - return Code::null();
|
| - } else {
|
| - FindRawCodeVisitor visitor(pc);
|
| - RawInstructions* instr;
|
| - instr = isolate->heap()->FindObjectInCodeSpace(&visitor);
|
| - if (instr != Instructions::null()) {
|
| - return Instructions::Handle(instr).code();
|
| - }
|
| - return Code::null();
|
| + SlowFindRawCodeVisitor visitor(pc);
|
| + RawObject* needle = isolate->heap()->FindOldObject(&visitor);
|
| + if (needle != Code::null()) {
|
| + return static_cast<RawCode*>(needle);
|
| }
|
| + return Code::null();
|
| }
|
|
|
|
|
|
|