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

Side by Side Diff: runtime/vm/object.cc

Issue 2157223002: Fix crash looking at a Code object in an AOT program with the service protocol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/become.h" 10 #include "vm/become.h"
(...skipping 12470 matching lines...) Expand 10 before | Expand all | Expand 10 after
12481 const intptr_t num_args = NumArgsTested(); 12481 const intptr_t num_args = NumArgsTested();
12482 const intptr_t num_checks = NumberOfChecks(); 12482 const intptr_t num_checks = NumberOfChecks();
12483 return OS::SCreate(Thread::Current()->zone(), 12483 return OS::SCreate(Thread::Current()->zone(),
12484 "ICData target:'%s' num-args: %" Pd " num-checks: %" Pd "", 12484 "ICData target:'%s' num-args: %" Pd " num-checks: %" Pd "",
12485 name.ToCString(), num_args, num_checks); 12485 name.ToCString(), num_args, num_checks);
12486 } 12486 }
12487 12487
12488 12488
12489 RawFunction* ICData::Owner() const { 12489 RawFunction* ICData::Owner() const {
12490 Object& obj = Object::Handle(raw_ptr()->owner_); 12490 Object& obj = Object::Handle(raw_ptr()->owner_);
12491 if (obj.IsFunction()) { 12491 if (obj.IsNull()) {
12492 ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT);
12493 return Function::null();
12494 } else if (obj.IsFunction()) {
12492 return Function::Cast(obj).raw(); 12495 return Function::Cast(obj).raw();
12493 } else { 12496 } else {
12494 ICData& original = ICData::Handle(); 12497 ICData& original = ICData::Handle();
12495 original ^= obj.raw(); 12498 original ^= obj.raw();
12496 return original.Owner(); 12499 return original.Owner();
12497 } 12500 }
12498 } 12501 }
12499 12502
12500 12503
12501 RawICData* ICData::Original() const { 12504 RawICData* ICData::Original() const {
(...skipping 10109 matching lines...) Expand 10 before | Expand all | Expand 10 after
22611 return UserTag::null(); 22614 return UserTag::null();
22612 } 22615 }
22613 22616
22614 22617
22615 const char* UserTag::ToCString() const { 22618 const char* UserTag::ToCString() const {
22616 const String& tag_label = String::Handle(label()); 22619 const String& tag_label = String::Handle(label());
22617 return tag_label.ToCString(); 22620 return tag_label.ToCString();
22618 } 22621 }
22619 22622
22620 } // namespace dart 22623 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698