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 "platform/utils.h" | 8 #include "platform/utils.h" |
9 #include "vm/ast_transformer.h" | 9 #include "vm/ast_transformer.h" |
10 #include "vm/bootstrap.h" | 10 #include "vm/bootstrap.h" |
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 param_descriptor.SetAt(j + kParameterDefaultValueOffset, | 854 param_descriptor.SetAt(j + kParameterDefaultValueOffset, |
855 (param[i].default_value == NULL) ? Object::null_instance() : | 855 (param[i].default_value == NULL) ? Object::null_instance() : |
856 *(param[i].default_value)); | 856 *(param[i].default_value)); |
857 const Object* metadata = param[i].metadata; | 857 const Object* metadata = param[i].metadata; |
858 if ((metadata != NULL) && (*metadata).IsError()) { | 858 if ((metadata != NULL) && (*metadata).IsError()) { |
859 return metadata->raw(); // Error evaluating the metadata. | 859 return metadata->raw(); // Error evaluating the metadata. |
860 } | 860 } |
861 param_descriptor.SetAt(j + kParameterMetadataOffset, | 861 param_descriptor.SetAt(j + kParameterMetadataOffset, |
862 (param[i].metadata == NULL) ? Object::null_instance() : | 862 (param[i].metadata == NULL) ? Object::null_instance() : |
863 *(param[i].metadata)); | 863 *(param[i].metadata)); |
| 864 param_descriptor.SetAt(j + kParameterIsFieldInitializorOffset, |
| 865 param[i].is_field_initializer ? Bool::True() : |
| 866 Bool::False()); |
864 } | 867 } |
865 return param_descriptor.raw(); | 868 return param_descriptor.raw(); |
866 } else { | 869 } else { |
867 Error& error = Error::Handle(); | 870 Error& error = Error::Handle(); |
868 error = isolate->object_store()->sticky_error(); | 871 error = isolate->object_store()->sticky_error(); |
869 isolate->object_store()->clear_sticky_error(); | 872 isolate->object_store()->clear_sticky_error(); |
870 return error.raw(); | 873 return error.raw(); |
871 } | 874 } |
872 UNREACHABLE(); | 875 UNREACHABLE(); |
873 return Object::null(); | 876 return Object::null(); |
(...skipping 13415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14289 void Parser::SkipQualIdent() { | 14292 void Parser::SkipQualIdent() { |
14290 ASSERT(IsIdentifier()); | 14293 ASSERT(IsIdentifier()); |
14291 ConsumeToken(); | 14294 ConsumeToken(); |
14292 if (CurrentToken() == Token::kPERIOD) { | 14295 if (CurrentToken() == Token::kPERIOD) { |
14293 ConsumeToken(); // Consume the kPERIOD token. | 14296 ConsumeToken(); // Consume the kPERIOD token. |
14294 ExpectIdentifier("identifier expected after '.'"); | 14297 ExpectIdentifier("identifier expected after '.'"); |
14295 } | 14298 } |
14296 } | 14299 } |
14297 | 14300 |
14298 } // namespace dart | 14301 } // namespace dart |
OLD | NEW |