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

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

Issue 15494008: - Some of the pre registered classes like Int, Double etc. were not being (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/object.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 "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 3232 matching lines...) Expand 10 before | Expand all | Expand 10 after
3243 orig_type_parameters = cls.type_parameters(); 3243 orig_type_parameters = cls.type_parameters();
3244 // A patch class must be given the same name as the class it is patching, 3244 // A patch class must be given the same name as the class it is patching,
3245 // otherwise the generic signature classes it defines will not match the 3245 // otherwise the generic signature classes it defines will not match the
3246 // patched generic signature classes. Therefore, new signature classes 3246 // patched generic signature classes. Therefore, new signature classes
3247 // will be introduced and the original ones will not get finalized. 3247 // will be introduced and the original ones will not get finalized.
3248 cls = Class::New(class_name, script_, classname_pos); 3248 cls = Class::New(class_name, script_, classname_pos);
3249 cls.set_library(library_); 3249 cls.set_library(library_);
3250 } else { 3250 } else {
3251 // Not patching a class, but it has been found. This must be one of the 3251 // Not patching a class, but it has been found. This must be one of the
3252 // pre-registered classes from object.cc or a duplicate definition. 3252 // pre-registered classes from object.cc or a duplicate definition.
3253 if (cls.functions() != Object::empty_array().raw()) { 3253 if (!(cls.is_prefinalized() ||
3254 RawObject::IsTypedDataViewClassId(cls.id()))) {
3254 ErrorMsg(classname_pos, "class '%s' is already defined", 3255 ErrorMsg(classname_pos, "class '%s' is already defined",
3255 class_name.ToCString()); 3256 class_name.ToCString());
3256 } 3257 }
3257 // Pre-registered classes need their scripts connected at this time. 3258 // Pre-registered classes need their scripts connected at this time.
3258 cls.set_script(script_); 3259 cls.set_script(script_);
3259 } 3260 }
3260 } 3261 }
3261 ASSERT(!cls.IsNull()); 3262 ASSERT(!cls.IsNull());
3262 ASSERT(cls.functions() == Object::empty_array().raw()); 3263 ASSERT(cls.functions() == Object::empty_array().raw());
3263 set_current_class(cls); 3264 set_current_class(cls);
(...skipping 6690 matching lines...) Expand 10 before | Expand all | Expand 10 after
9954 void Parser::SkipQualIdent() { 9955 void Parser::SkipQualIdent() {
9955 ASSERT(IsIdentifier()); 9956 ASSERT(IsIdentifier());
9956 ConsumeToken(); 9957 ConsumeToken();
9957 if (CurrentToken() == Token::kPERIOD) { 9958 if (CurrentToken() == Token::kPERIOD) {
9958 ConsumeToken(); // Consume the kPERIOD token. 9959 ConsumeToken(); // Consume the kPERIOD token.
9959 ExpectIdentifier("identifier expected after '.'"); 9960 ExpectIdentifier("identifier expected after '.'");
9960 } 9961 }
9961 } 9962 }
9962 9963
9963 } // namespace dart 9964 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698