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

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

Issue 23691008: Compress memory usage. Imprive speed of finding exception handlers: if a code does not have any han… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « no previous file | runtime/vm/object.h » ('j') | runtime/vm/object.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/exceptions.h" 5 #include "vm/exceptions.h"
6 6
7 #include "vm/dart_api_impl.h" 7 #include "vm/dart_api_impl.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/debugger.h" 9 #include "vm/debugger.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 __asan_unpoison_memory_region(reinterpret_cast<void*>(current_sp), 358 __asan_unpoison_memory_region(reinterpret_cast<void*>(current_sp),
359 stack_pointer - current_sp); 359 stack_pointer - current_sp);
360 func(program_counter, stack_pointer, frame_pointer, 360 func(program_counter, stack_pointer, frame_pointer,
361 raw_exception, raw_stacktrace); 361 raw_exception, raw_stacktrace);
362 #endif 362 #endif
363 UNREACHABLE(); 363 UNREACHABLE();
364 } 364 }
365 365
366 366
367 static RawField* LookupStacktraceField(const Instance& instance) { 367 static RawField* LookupStacktraceField(const Instance& instance) {
368 if (instance.GetClassId() < kNumPredefinedCids) {
369 // 'error_class' is not a predefined class.
siva 2013/08/29 16:29:20 // 'class Error' is not a predefined class.
srdjan 2013/08/29 16:38:13 Done.
370 return Field::null();
371 }
368 Isolate* isolate = Isolate::Current(); 372 Isolate* isolate = Isolate::Current();
369 Class& error_class = Class::Handle(isolate, 373 Class& error_class = Class::Handle(isolate,
370 isolate->object_store()->error_class()); 374 isolate->object_store()->error_class());
371 if (error_class.IsNull()) { 375 if (error_class.IsNull()) {
372 const Library& core_lib = Library::Handle(isolate, Library::CoreLibrary()); 376 const Library& core_lib = Library::Handle(isolate, Library::CoreLibrary());
373 error_class = core_lib.LookupClass(Symbols::Error(), NULL); 377 error_class = core_lib.LookupClass(Symbols::Error(), NULL);
374 ASSERT(!error_class.IsNull()); 378 ASSERT(!error_class.IsNull());
375 isolate->object_store()->set_error_class(error_class); 379 isolate->object_store()->set_error_class(error_class);
376 } 380 }
377 const Class& instance_class = Class::Handle(isolate, instance.clazz()); 381 const Class& instance_class = Class::Handle(isolate, instance.clazz());
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 break; 749 break;
746 } 750 }
747 751
748 return DartLibraryCalls::InstanceCreate(library, 752 return DartLibraryCalls::InstanceCreate(library,
749 *class_name, 753 *class_name,
750 *constructor_name, 754 *constructor_name,
751 arguments); 755 arguments);
752 } 756 }
753 757
754 } // namespace dart 758 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698