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

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

Issue 50243004: Fix bug with guarded fields and deserialization. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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
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 "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 initializers->NodeAt(i)->AsStoreInstanceFieldNode(); 2084 initializers->NodeAt(i)->AsStoreInstanceFieldNode();
2085 if (initializer->field().raw() == field.raw()) { 2085 if (initializer->field().raw() == field.raw()) {
2086 found = true; 2086 found = true;
2087 break; 2087 break;
2088 } 2088 }
2089 } 2089 }
2090 } 2090 }
2091 2091
2092 if (found) continue; 2092 if (found) continue;
2093 2093
2094 field.UpdateCid(kNullCid); 2094 field.UpdateGuardedCidAndLength(Object::Handle());
2095 field.UpdateLength(Field::kNoFixedLength);
2096 } 2095 }
2097 } 2096 }
2098 2097
2099 2098
2100 AstNode* Parser::ParseExternalInitializedField(const Field& field) { 2099 AstNode* Parser::ParseExternalInitializedField(const Field& field) {
2101 // Only use this function if the initialized field originates 2100 // Only use this function if the initialized field originates
2102 // from a different class. We need to save and restore current 2101 // from a different class. We need to save and restore current
2103 // class, library, and token stream (script). 2102 // class, library, and token stream (script).
2104 ASSERT(current_class().raw() != field.origin()); 2103 ASSERT(current_class().raw() != field.origin());
2105 const Class& saved_class = Class::Handle(current_class().raw()); 2104 const Class& saved_class = Class::Handle(current_class().raw());
(...skipping 8482 matching lines...) Expand 10 before | Expand all | Expand 10 after
10588 void Parser::SkipQualIdent() { 10587 void Parser::SkipQualIdent() {
10589 ASSERT(IsIdentifier()); 10588 ASSERT(IsIdentifier());
10590 ConsumeToken(); 10589 ConsumeToken();
10591 if (CurrentToken() == Token::kPERIOD) { 10590 if (CurrentToken() == Token::kPERIOD) {
10592 ConsumeToken(); // Consume the kPERIOD token. 10591 ConsumeToken(); // Consume the kPERIOD token.
10593 ExpectIdentifier("identifier expected after '.'"); 10592 ExpectIdentifier("identifier expected after '.'");
10594 } 10593 }
10595 } 10594 }
10596 10595
10597 } // namespace dart 10596 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698