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

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

Issue 575663002: Eliminate 99% of allocated ExceptionHandler objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/raw_object.cc ('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.h" 7 #include "vm/assembler.h"
8 #include "vm/deopt_instructions.h" 8 #include "vm/deopt_instructions.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 REUSABLE_CODE_HANDLESCOPE(isolate); 211 REUSABLE_CODE_HANDLESCOPE(isolate);
212 Code& code = reused_code_handle.Handle(); 212 Code& code = reused_code_handle.Handle();
213 code = LookupDartCode(); 213 code = LookupDartCode();
214 if (code.IsNull()) { 214 if (code.IsNull()) {
215 return false; // Stub frames do not have exception handlers. 215 return false; // Stub frames do not have exception handlers.
216 } 216 }
217 217
218 REUSABLE_EXCEPTION_HANDLERS_HANDLESCOPE(isolate); 218 REUSABLE_EXCEPTION_HANDLERS_HANDLESCOPE(isolate);
219 ExceptionHandlers& handlers = reused_exception_handlers_handle.Handle(); 219 ExceptionHandlers& handlers = reused_exception_handlers_handle.Handle();
220 handlers = code.exception_handlers(); 220 handlers = code.exception_handlers();
221 if (handlers.Length() == 0) { 221 if (handlers.num_entries() == 0) {
222 return false; 222 return false;
223 } 223 }
224 224
225 // Find pc descriptor for the current pc. 225 // Find pc descriptor for the current pc.
226 REUSABLE_PC_DESCRIPTORS_HANDLESCOPE(isolate); 226 REUSABLE_PC_DESCRIPTORS_HANDLESCOPE(isolate);
227 PcDescriptors& descriptors = reused_pc_descriptors_handle.Handle(); 227 PcDescriptors& descriptors = reused_pc_descriptors_handle.Handle();
228 descriptors = code.pc_descriptors(); 228 descriptors = code.pc_descriptors();
229 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind); 229 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind);
230 while (iter.MoveNext()) { 230 while (iter.MoveNext()) {
231 const intptr_t current_try_index = iter.TryIndex(); 231 const intptr_t current_try_index = iter.TryIndex();
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { 484 if (deopt_instr->kind() == DeoptInstr::kCallerFp) {
485 return (index - num_materializations_); 485 return (index - num_materializations_);
486 } 486 }
487 } 487 }
488 UNREACHABLE(); 488 UNREACHABLE();
489 return 0; 489 return 0;
490 } 490 }
491 491
492 492
493 } // namespace dart 493 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698