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

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

Issue 818443003: Fix crash in observatory: stub code do not have inlined intervals information. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/stub_code_arm.cc » ('j') | 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/cpu.h" 10 #include "vm/cpu.h"
(...skipping 12622 matching lines...) Expand 10 before | Expand all | Expand 10 after
12633 // If the code has stackmaps, it must have them for all safepoints. 12633 // If the code has stackmaps, it must have them for all safepoints.
12634 UNREACHABLE(); 12634 UNREACHABLE();
12635 return Stackmap::null(); 12635 return Stackmap::null();
12636 } 12636 }
12637 12637
12638 12638
12639 void Code::GetInlinedFunctionsAt( 12639 void Code::GetInlinedFunctionsAt(
12640 intptr_t offset, GrowableArray<Function*>* fs) const { 12640 intptr_t offset, GrowableArray<Function*>* fs) const {
12641 fs->Clear(); 12641 fs->Clear();
12642 const Array& intervals = Array::Handle(inlined_intervals()); 12642 const Array& intervals = Array::Handle(inlined_intervals());
12643 if (intervals.IsNull()) {
12644 // E.g., for code stubs.
12645 return;
12646 }
12643 Smi& start = Smi::Handle(); 12647 Smi& start = Smi::Handle();
12644 Smi& end = Smi::Handle(); 12648 Smi& end = Smi::Handle();
12645 Function& function = Function::Handle(); 12649 Function& function = Function::Handle();
12646 for (intptr_t i = 0; i < intervals.Length(); i += Code::kInlIntNumEntries) { 12650 for (intptr_t i = 0; i < intervals.Length(); i += Code::kInlIntNumEntries) {
12647 start ^= intervals.At(i + Code::kInlIntStart); 12651 start ^= intervals.At(i + Code::kInlIntStart);
12648 if (!start.IsNull()) { 12652 if (!start.IsNull()) {
12649 end ^= intervals.At(i + Code::kInlIntEnd); 12653 end ^= intervals.At(i + Code::kInlIntEnd);
12650 if ((start.Value() <= offset) && (offset < end.Value())) { 12654 if ((start.Value() <= offset) && (offset < end.Value())) {
12651 function ^= intervals.At(i + Code::kInlIntFunction); 12655 function ^= intervals.At(i + Code::kInlIntFunction);
12652 fs->Add(&Function::ZoneHandle(function.raw())); 12656 fs->Add(&Function::ZoneHandle(function.raw()));
(...skipping 7974 matching lines...) Expand 10 before | Expand all | Expand 10 after
20627 return tag_label.ToCString(); 20631 return tag_label.ToCString();
20628 } 20632 }
20629 20633
20630 20634
20631 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 20635 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
20632 Instance::PrintJSONImpl(stream, ref); 20636 Instance::PrintJSONImpl(stream, ref);
20633 } 20637 }
20634 20638
20635 20639
20636 } // namespace dart 20640 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698