Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 5351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5362 // Patch the function type of the variable now that the signature is known. | 5362 // Patch the function type of the variable now that the signature is known. |
| 5363 function_type.set_type_class(signature_class); | 5363 function_type.set_type_class(signature_class); |
| 5364 function_type.set_arguments(signature_type_arguments); | 5364 function_type.set_arguments(signature_type_arguments); |
| 5365 | 5365 |
| 5366 // Mark the function type as malformed if the signature type is malformed. | 5366 // Mark the function type as malformed if the signature type is malformed. |
| 5367 if (signature_type.IsMalformed()) { | 5367 if (signature_type.IsMalformed()) { |
| 5368 const Error& error = Error::Handle(signature_type.malformed_error()); | 5368 const Error& error = Error::Handle(signature_type.malformed_error()); |
| 5369 function_type.set_malformed_error(error); | 5369 function_type.set_malformed_error(error); |
| 5370 } | 5370 } |
| 5371 | 5371 |
| 5372 // The function type was initially marked as instantiated, but it may | |
|
zra
2013/07/31 21:32:33
Why might it be wrong the first time?
regis
2013/07/31 23:16:44
See comment on line 5269. The local variable and i
| |
| 5373 // actually be uninstantiated. | |
| 5374 function_type.ResetIsFinalized(); | |
| 5375 | |
| 5372 // The function variable type should have been patched above. | 5376 // The function variable type should have been patched above. |
| 5373 ASSERT((function_variable == NULL) || | 5377 ASSERT((function_variable == NULL) || |
| 5374 (function_variable->type().raw() == function_type.raw())); | 5378 (function_variable->type().raw() == function_type.raw())); |
| 5375 } | 5379 } |
| 5376 | 5380 |
| 5377 // The code generator does not compile the closure function when visiting | 5381 // The code generator does not compile the closure function when visiting |
| 5378 // a ClosureNode. The generated code allocates a new Closure object containing | 5382 // a ClosureNode. The generated code allocates a new Closure object containing |
| 5379 // the current context. The type of the Closure object refers to the closure | 5383 // the current context. The type of the Closure object refers to the closure |
| 5380 // function, which will be compiled on first invocation of the closure object. | 5384 // function, which will be compiled on first invocation of the closure object. |
| 5381 // Therefore, we ignore the parsed default_parameter_values and the | 5385 // Therefore, we ignore the parsed default_parameter_values and the |
| (...skipping 4868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10250 void Parser::SkipQualIdent() { | 10254 void Parser::SkipQualIdent() { |
| 10251 ASSERT(IsIdentifier()); | 10255 ASSERT(IsIdentifier()); |
| 10252 ConsumeToken(); | 10256 ConsumeToken(); |
| 10253 if (CurrentToken() == Token::kPERIOD) { | 10257 if (CurrentToken() == Token::kPERIOD) { |
| 10254 ConsumeToken(); // Consume the kPERIOD token. | 10258 ConsumeToken(); // Consume the kPERIOD token. |
| 10255 ExpectIdentifier("identifier expected after '.'"); | 10259 ExpectIdentifier("identifier expected after '.'"); |
| 10256 } | 10260 } |
| 10257 } | 10261 } |
| 10258 | 10262 |
| 10259 } // namespace dart | 10263 } // namespace dart |
| OLD | NEW |