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

Side by Side Diff: vm/class_finalizer.cc

Issue 8361017: Fix intermittent simarm build breakage on macos. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 2 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 | 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) 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/class_finalizer.h" 5 #include "vm/class_finalizer.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/heap.h" 8 #include "vm/heap.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 if (type_class.IsSignatureClass()) { 504 if (type_class.IsSignatureClass()) {
505 ResolveAndFinalizeSignature( 505 ResolveAndFinalizeSignature(
506 type_class, Function::Handle(type_class.signature_function())); 506 type_class, Function::Handle(type_class.signature_function()));
507 } 507 }
508 508
509 parameterized_type.set_is_finalized(); 509 parameterized_type.set_is_finalized();
510 } 510 }
511 511
512 512
513 RawString* ClassFinalizer::FinalizeTypeWhileParsing(const Type& type) { 513 RawString* ClassFinalizer::FinalizeTypeWhileParsing(const Type& type) {
514 String& msg = String::Handle();
515 Isolate* isolate = Isolate::Current(); 514 Isolate* isolate = Isolate::Current();
516 ASSERT(isolate != NULL); 515 ASSERT(isolate != NULL);
517 LongJump* base = isolate->long_jump_base(); 516 LongJump* base = isolate->long_jump_base();
518 LongJump jump; 517 LongJump jump;
519 isolate->set_long_jump_base(&jump); 518 isolate->set_long_jump_base(&jump);
520 if (setjmp(*jump.Set()) == 0) { 519 if (setjmp(*jump.Set()) == 0) {
521 FinalizeType(type); 520 FinalizeType(type);
521 isolate->set_long_jump_base(base);
522 return String::null();
522 } else { 523 } else {
523 // Error occured: Get the error message. 524 // Error occured: Get the error message.
524 msg = isolate->object_store()->sticky_error(); 525 isolate->set_long_jump_base(base);
526 return isolate->object_store()->sticky_error();
525 } 527 }
526 isolate->set_long_jump_base(base); 528 UNREACHABLE();
527 return msg.raw(); 529 return String::null();
528 } 530 }
529 531
530 532
531 // Top level function signatures are canonicalized, added to the library class 533 // Top level function signatures are canonicalized, added to the library class
532 // dictionary, and finalized with other library classes and interfaces. 534 // dictionary, and finalized with other library classes and interfaces.
533 // Function signatures used as type of a local variable or of a local function 535 // Function signatures used as type of a local variable or of a local function
534 // are canonicalized and finalized upon creation, since all the types they 536 // are canonicalized and finalized upon creation, since all the types they
535 // reference are already resolved. 537 // reference are already resolved.
536 void ClassFinalizer::ResolveAndFinalizeSignature(const Class& cls, 538 void ClassFinalizer::ResolveAndFinalizeSignature(const Class& cls,
537 const Function& function) { 539 const Function& function) {
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 ASSERT(msg_buffer != NULL); 985 ASSERT(msg_buffer != NULL);
984 va_list args; 986 va_list args;
985 va_start(args, format); 987 va_start(args, format);
986 OS::VSNPrint(msg_buffer, kBufferLength, format, args); 988 OS::VSNPrint(msg_buffer, kBufferLength, format, args);
987 va_end(args); 989 va_end(args);
988 isolate->long_jump_base()->Jump(1, msg_buffer); 990 isolate->long_jump_base()->Jump(1, msg_buffer);
989 UNREACHABLE(); 991 UNREACHABLE();
990 } 992 }
991 993
992 } // namespace dart 994 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698