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

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

Issue 10880079: Emit deoptimization information at static calls (preparation for full deoptimization). … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « runtime/vm/intermediate_language.h ('k') | 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/stack_frame.h" 5 #include "vm/stack_frame.h"
6 6
7 #include "vm/assembler_macros.h" 7 #include "vm/assembler_macros.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const Code& code = Code::Handle(LookupDartCode()); 127 const Code& code = Code::Handle(LookupDartCode());
128 if (code.IsNull()) { 128 if (code.IsNull()) {
129 return false; // Stub frames do not have exception handlers. 129 return false; // Stub frames do not have exception handlers.
130 } 130 }
131 131
132 // First try to find pc descriptor for the current pc. 132 // First try to find pc descriptor for the current pc.
133 intptr_t try_index = -1; 133 intptr_t try_index = -1;
134 const PcDescriptors& descriptors = 134 const PcDescriptors& descriptors =
135 PcDescriptors::Handle(code.pc_descriptors()); 135 PcDescriptors::Handle(code.pc_descriptors());
136 for (intptr_t i = 0; i < descriptors.Length(); i++) { 136 for (intptr_t i = 0; i < descriptors.Length(); i++) {
137 if (static_cast<uword>(descriptors.PC(i)) == pc() && 137 // TryIndex is invalid for PcDescriptors::kDeoptIndex.
138 descriptors.TryIndex(i) != -1) { 138 if ((static_cast<uword>(descriptors.PC(i)) == pc()) &&
139 (descriptors.DescriptorKind(i) != PcDescriptors::kDeoptIndex) &&
140 (descriptors.TryIndex(i) != -1)) {
139 try_index = descriptors.TryIndex(i); 141 try_index = descriptors.TryIndex(i);
140 break; 142 break;
141 } 143 }
142 } 144 }
143 if (try_index != -1) { 145 if (try_index != -1) {
144 // We found a pc descriptor, now try to see if we have an 146 // We found a pc descriptor, now try to see if we have an
145 // exception catch handler for this try index. 147 // exception catch handler for this try index.
146 const ExceptionHandlers& handlers = 148 const ExceptionHandlers& handlers =
147 ExceptionHandlers::Handle(code.exception_handlers()); 149 ExceptionHandlers::Handle(code.exception_handlers());
148 for (intptr_t j = 0; j < handlers.Length(); j++) { 150 for (intptr_t j = 0; j < handlers.Length(); j++) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 EntryFrame* StackFrameIterator::NextEntryFrame() { 244 EntryFrame* StackFrameIterator::NextEntryFrame() {
243 ASSERT(!frames_.HasNext()); 245 ASSERT(!frames_.HasNext());
244 entry_.sp_ = frames_.sp_; 246 entry_.sp_ = frames_.sp_;
245 entry_.fp_ = frames_.fp_; 247 entry_.fp_ = frames_.fp_;
246 SetupNextExitFrameData(); // Setup data for next exit frame in chain. 248 SetupNextExitFrameData(); // Setup data for next exit frame in chain.
247 ASSERT(entry_.IsValid()); 249 ASSERT(entry_.IsValid());
248 return &entry_; 250 return &entry_;
249 } 251 }
250 252
251 } // namespace dart 253 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698