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

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

Issue 9186058: Make the "sticky error" an Error instead of a String. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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/longjump_test.cc ('k') | runtime/vm/object_store.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) 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/object.h" 5 #include "vm/object.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/bootstrap.h" 10 #include "vm/bootstrap.h"
(...skipping 3313 matching lines...) Expand 10 before | Expand all | Expand 10 after
3324 const Script& script = Script::Handle(owner_class.script()); 3324 const Script& script = Script::Handle(owner_class.script());
3325 signature_class = Class::NewSignatureClass(signature, 3325 signature_class = Class::NewSignatureClass(signature,
3326 closure_function, 3326 closure_function,
3327 script); 3327 script);
3328 library.AddClass(signature_class); 3328 library.AddClass(signature_class);
3329 } else { 3329 } else {
3330 closure_function.set_signature_class(signature_class); 3330 closure_function.set_signature_class(signature_class);
3331 } 3331 }
3332 const Type& signature_type = Type::Handle(signature_class.SignatureType()); 3332 const Type& signature_type = Type::Handle(signature_class.SignatureType());
3333 if (!signature_type.IsFinalized()) { 3333 if (!signature_type.IsFinalized()) {
3334 String& errmsg = String::Handle(); 3334 Error& error = Error::Handle();
3335 ClassFinalizer::FinalizeAndCanonicalizeType(signature_class, 3335 ClassFinalizer::FinalizeAndCanonicalizeType(signature_class,
3336 signature_type, 3336 signature_type,
3337 &errmsg); 3337 &error);
3338 ASSERT(errmsg.IsNull()); 3338 ASSERT(error.IsNull());
3339 } 3339 }
3340 ASSERT(closure_function.signature_class() == signature_class.raw()); 3340 ASSERT(closure_function.signature_class() == signature_class.raw());
3341 set_implicit_closure_function(closure_function); 3341 set_implicit_closure_function(closure_function);
3342 ASSERT(closure_function.IsImplicitClosureFunction()); 3342 ASSERT(closure_function.IsImplicitClosureFunction());
3343 return closure_function.raw(); 3343 return closure_function.raw();
3344 } 3344 }
3345 3345
3346 3346
3347 template<typename T> 3347 template<typename T>
3348 static RawArray* NewArray(const GrowableArray<T*>& objs) { 3348 static RawArray* NewArray(const GrowableArray<T*>& objs) {
(...skipping 4260 matching lines...) Expand 10 before | Expand all | Expand 10 after
7609 const String& str = String::Handle(pattern()); 7609 const String& str = String::Handle(pattern());
7610 const char* format = "JSRegExp: pattern=%s flags=%s"; 7610 const char* format = "JSRegExp: pattern=%s flags=%s";
7611 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); 7611 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags());
7612 char* chars = reinterpret_cast<char*>( 7612 char* chars = reinterpret_cast<char*>(
7613 Isolate::Current()->current_zone()->Allocate(len + 1)); 7613 Isolate::Current()->current_zone()->Allocate(len + 1));
7614 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); 7614 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags());
7615 return chars; 7615 return chars;
7616 } 7616 }
7617 7617
7618 } // namespace dart 7618 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/longjump_test.cc ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698