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

Side by Side Diff: vm/exceptions.cc

Issue 11648006: Create read only handles for empty_array and sentinel objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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 | « vm/debugger.cc ('k') | vm/flow_graph_optimizer.h » ('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) 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 StubCode::JumpToErrorHandlerEntryPoint()); 136 StubCode::JumpToErrorHandlerEntryPoint());
137 func(program_counter, stack_pointer, frame_pointer, raw_error); 137 func(program_counter, stack_pointer, frame_pointer, raw_error);
138 UNREACHABLE(); 138 UNREACHABLE();
139 } 139 }
140 140
141 141
142 static void ThrowExceptionHelper(const Instance& incoming_exception, 142 static void ThrowExceptionHelper(const Instance& incoming_exception,
143 const Instance& existing_stacktrace) { 143 const Instance& existing_stacktrace) {
144 Instance& exception = Instance::Handle(incoming_exception.raw()); 144 Instance& exception = Instance::Handle(incoming_exception.raw());
145 if (exception.IsNull()) { 145 if (exception.IsNull()) {
146 const Array& arguments = Array::Handle(Object::empty_array()); 146 exception ^= Exceptions::Create(Exceptions::kNullThrown,
147 exception ^= Exceptions::Create(Exceptions::kNullThrown, arguments); 147 Object::empty_array());
148 } 148 }
149 uword handler_pc = 0; 149 uword handler_pc = 0;
150 uword handler_sp = 0; 150 uword handler_sp = 0;
151 uword handler_fp = 0; 151 uword handler_fp = 0;
152 const GrowableObjectArray& func_list = 152 const GrowableObjectArray& func_list =
153 GrowableObjectArray::Handle(GrowableObjectArray::New()); 153 GrowableObjectArray::Handle(GrowableObjectArray::New());
154 const GrowableObjectArray& code_list = 154 const GrowableObjectArray& code_list =
155 GrowableObjectArray::Handle(GrowableObjectArray::New()); 155 GrowableObjectArray::Handle(GrowableObjectArray::New());
156 const GrowableObjectArray& pc_offset_list = 156 const GrowableObjectArray& pc_offset_list =
157 GrowableObjectArray::Handle(GrowableObjectArray::New()); 157 GrowableObjectArray::Handle(GrowableObjectArray::New());
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 case kIsolateUnhandledException: 441 case kIsolateUnhandledException:
442 library = Library::IsolateLibrary(); 442 library = Library::IsolateLibrary();
443 class_name = Symbols::New("IsolateUnhandledException"); 443 class_name = Symbols::New("IsolateUnhandledException");
444 break; 444 break;
445 } 445 }
446 446
447 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments); 447 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments);
448 } 448 }
449 449
450 } // namespace dart 450 } // namespace dart
OLDNEW
« no previous file with comments | « vm/debugger.cc ('k') | vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698