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

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

Issue 10205006: Mark types as instantiated or uninstantiated upon finalization. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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') | runtime/vm/raw_object.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/parser.h" 5 #include "vm/parser.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 4064 matching lines...) Expand 10 before | Expand all | Expand 10 after
4075 if (variable_name != NULL) { 4075 if (variable_name != NULL) {
4076 // Since the function type depends on the signature of the closure function, 4076 // Since the function type depends on the signature of the closure function,
4077 // it cannot be determined before the formal parameter list of the closure 4077 // it cannot be determined before the formal parameter list of the closure
4078 // function is parsed. Therefore, we set the function type to a new 4078 // function is parsed. Therefore, we set the function type to a new
4079 // parameterized type to be patched after the actual type is known. 4079 // parameterized type to be patched after the actual type is known.
4080 // We temporarily use the class of the Function interface. 4080 // We temporarily use the class of the Function interface.
4081 const Class& unknown_signature_class = Class::Handle( 4081 const Class& unknown_signature_class = Class::Handle(
4082 Type::Handle(Type::FunctionInterface()).type_class()); 4082 Type::Handle(Type::FunctionInterface()).type_class());
4083 function_type = Type::New( 4083 function_type = Type::New(
4084 unknown_signature_class, TypeArguments::Handle(), ident_pos); 4084 unknown_signature_class, TypeArguments::Handle(), ident_pos);
4085 function_type.set_is_finalized(); // No real finalization needed. 4085 function_type.set_is_finalized_instantiated(); // No finalization needed.
4086 4086
4087 // Add the function variable to the scope before parsing the function in 4087 // Add the function variable to the scope before parsing the function in
4088 // order to allow self reference from inside the function. 4088 // order to allow self reference from inside the function.
4089 function_variable = new LocalVariable(ident_pos, 4089 function_variable = new LocalVariable(ident_pos,
4090 *variable_name, 4090 *variable_name,
4091 function_type); 4091 function_type);
4092 function_variable->set_is_final(); 4092 function_variable->set_is_final();
4093 ASSERT(current_block_ != NULL); 4093 ASSERT(current_block_ != NULL);
4094 ASSERT(current_block_->scope != NULL); 4094 ASSERT(current_block_->scope != NULL);
4095 if (!current_block_->scope->AddVariable(function_variable)) { 4095 if (!current_block_->scope->AddVariable(function_variable)) {
(...skipping 4315 matching lines...) Expand 10 before | Expand all | Expand 10 after
8411 void Parser::SkipQualIdent() { 8411 void Parser::SkipQualIdent() {
8412 ASSERT(IsIdentifier()); 8412 ASSERT(IsIdentifier());
8413 ConsumeToken(); 8413 ConsumeToken();
8414 if (CurrentToken() == Token::kPERIOD) { 8414 if (CurrentToken() == Token::kPERIOD) {
8415 ConsumeToken(); // Consume the kPERIOD token. 8415 ConsumeToken(); // Consume the kPERIOD token.
8416 ExpectIdentifier("identifier expected after '.'"); 8416 ExpectIdentifier("identifier expected after '.'");
8417 } 8417 }
8418 } 8418 }
8419 8419
8420 } // namespace dart 8420 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698