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

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

Issue 108513016: Adds missing calls to reset long_jump_base. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/flow_graph_inliner.cc ('k') | 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) 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/parser.h" 5 #include "vm/parser.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 const Array& param_descriptor = 736 const Array& param_descriptor =
737 Array::Handle(Array::New(param_cnt * kParameterEntrySize)); 737 Array::Handle(Array::New(param_cnt * kParameterEntrySize));
738 for (int i = 0, j = 0; i < param_cnt; i++, j += kParameterEntrySize) { 738 for (int i = 0, j = 0; i < param_cnt; i++, j += kParameterEntrySize) {
739 param_descriptor.SetAt(j + kParameterIsFinalOffset, 739 param_descriptor.SetAt(j + kParameterIsFinalOffset,
740 param[i].is_final ? Bool::True() : Bool::False()); 740 param[i].is_final ? Bool::True() : Bool::False());
741 param_descriptor.SetAt(j + kParameterDefaultValueOffset, 741 param_descriptor.SetAt(j + kParameterDefaultValueOffset,
742 (param[i].default_value == NULL) ? Object::null_instance() : 742 (param[i].default_value == NULL) ? Object::null_instance() :
743 *(param[i].default_value)); 743 *(param[i].default_value));
744 const Object* metadata = param[i].metadata; 744 const Object* metadata = param[i].metadata;
745 if ((metadata != NULL) && (*metadata).IsError()) { 745 if ((metadata != NULL) && (*metadata).IsError()) {
746 isolate->set_long_jump_base(base);
746 return (*metadata).raw(); // Error evaluating the metadata. 747 return (*metadata).raw(); // Error evaluating the metadata.
hausner 2014/01/02 18:54:23 Not your code, but (*p).xxx is normally written as
zra 2014/01/02 19:14:02 Done.
747 } 748 }
748 param_descriptor.SetAt(j + kParameterMetadataOffset, 749 param_descriptor.SetAt(j + kParameterMetadataOffset,
749 (param[i].metadata == NULL) ? Object::null_instance() : 750 (param[i].metadata == NULL) ? Object::null_instance() :
750 *(param[i].metadata)); 751 *(param[i].metadata));
751 } 752 }
752 isolate->set_long_jump_base(base); 753 isolate->set_long_jump_base(base);
753 return param_descriptor.raw(); 754 return param_descriptor.raw();
754 } else { 755 } else {
755 Error& error = Error::Handle(); 756 Error& error = Error::Handle();
756 error = isolate->object_store()->sticky_error(); 757 error = isolate->object_store()->sticky_error();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 StackZone zone(isolate); 858 StackZone zone(isolate);
858 LongJump* base = isolate->long_jump_base(); 859 LongJump* base = isolate->long_jump_base();
859 LongJump jump; 860 LongJump jump;
860 isolate->set_long_jump_base(&jump); 861 isolate->set_long_jump_base(&jump);
861 if (setjmp(*jump.Set()) == 0) { 862 if (setjmp(*jump.Set()) == 0) {
862 const Script& script = Script::Handle(cls.script()); 863 const Script& script = Script::Handle(cls.script());
863 const Library& lib = Library::Handle(cls.library()); 864 const Library& lib = Library::Handle(cls.library());
864 Parser parser(script, lib, token_pos); 865 Parser parser(script, lib, token_pos);
865 parser.set_current_class(cls); 866 parser.set_current_class(cls);
866 parser.set_parsing_metadata(true); 867 parser.set_parsing_metadata(true);
868 isolate->set_long_jump_base(base);
hausner 2014/01/02 18:54:23 I think this should happen after the call to Evalu
zra 2014/01/02 19:14:02 Done.
867 return parser.EvaluateMetadata(); 869 return parser.EvaluateMetadata();
868 } else { 870 } else {
869 Error& error = Error::Handle(); 871 Error& error = Error::Handle();
870 error = isolate->object_store()->sticky_error(); 872 error = isolate->object_store()->sticky_error();
871 isolate->object_store()->clear_sticky_error(); 873 isolate->object_store()->clear_sticky_error();
872 isolate->set_long_jump_base(base); 874 isolate->set_long_jump_base(base);
873 return error.raw(); 875 return error.raw();
874 } 876 }
875 UNREACHABLE(); 877 UNREACHABLE();
876 return Object::null(); 878 return Object::null();
(...skipping 9879 matching lines...) Expand 10 before | Expand all | Expand 10 after
10756 void Parser::SkipQualIdent() { 10758 void Parser::SkipQualIdent() {
10757 ASSERT(IsIdentifier()); 10759 ASSERT(IsIdentifier());
10758 ConsumeToken(); 10760 ConsumeToken();
10759 if (CurrentToken() == Token::kPERIOD) { 10761 if (CurrentToken() == Token::kPERIOD) {
10760 ConsumeToken(); // Consume the kPERIOD token. 10762 ConsumeToken(); // Consume the kPERIOD token.
10761 ExpectIdentifier("identifier expected after '.'"); 10763 ExpectIdentifier("identifier expected after '.'");
10762 } 10764 }
10763 } 10765 }
10764 10766
10765 } // namespace dart 10767 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698