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: runtime/lib/object.cc

Issue 883263004: Allows turning on checked mode on a per-isolate basis (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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/include/dart_api.h ('k') | runtime/vm/ast.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) 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/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/exceptions.h" 9 #include "vm/exceptions.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 252 }
253 String& bound_error_message = String::Handle(); 253 String& bound_error_message = String::Handle();
254 if (bound_error.IsNull()) { 254 if (bound_error.IsNull()) {
255 const String& dst_name = String::ZoneHandle( 255 const String& dst_name = String::ZoneHandle(
256 Symbols::New(Exceptions::kCastErrorDstName)); 256 Symbols::New(Exceptions::kCastErrorDstName));
257 257
258 Exceptions::CreateAndThrowTypeError( 258 Exceptions::CreateAndThrowTypeError(
259 location, instance_type_name, type_name, 259 location, instance_type_name, type_name,
260 dst_name, Object::null_string()); 260 dst_name, Object::null_string());
261 } else { 261 } else {
262 ASSERT(FLAG_enable_type_checks); 262 ASSERT(Isolate::Current()->TypeChecksEnabled());
263 bound_error_message = String::New(bound_error.ToErrorCString()); 263 bound_error_message = String::New(bound_error.ToErrorCString());
264 Exceptions::CreateAndThrowTypeError( 264 Exceptions::CreateAndThrowTypeError(
265 location, instance_type_name, Symbols::Empty(), 265 location, instance_type_name, Symbols::Empty(),
266 Symbols::Empty(), bound_error_message); 266 Symbols::Empty(), bound_error_message);
267 } 267 }
268 UNREACHABLE(); 268 UNREACHABLE();
269 } 269 }
270 return instance.raw(); 270 return instance.raw();
271 } 271 }
272 272
(...skipping 27 matching lines...) Expand all
300 // Currently all errors are Dart instances, e.g. I/O errors 300 // Currently all errors are Dart instances, e.g. I/O errors
301 // created by deferred loading code. LanguageErrors from 301 // created by deferred loading code. LanguageErrors from
302 // failed loading or finalization attempts are propagated and result 302 // failed loading or finalization attempts are propagated and result
303 // in the isolate's death. 303 // in the isolate's death.
304 const Instance& error = Instance::Handle(prefix.LoadError()); 304 const Instance& error = Instance::Handle(prefix.LoadError());
305 return error.raw(); 305 return error.raw();
306 } 306 }
307 307
308 308
309 } // namespace dart 309 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698