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 4851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4862 names_field.RecordStore(names_array); | 4862 names_field.RecordStore(names_array); |
4863 | 4863 |
4864 // Clone the toString() function from the helper class. | 4864 // Clone the toString() function from the helper class. |
4865 Function& to_string_func = Function::Handle(Z, | 4865 Function& to_string_func = Function::Handle(Z, |
4866 helper_class.LookupDynamicFunctionAllowPrivate(Symbols::toString())); | 4866 helper_class.LookupDynamicFunctionAllowPrivate(Symbols::toString())); |
4867 ASSERT(!to_string_func.IsNull()); | 4867 ASSERT(!to_string_func.IsNull()); |
4868 to_string_func = to_string_func.Clone(cls); | 4868 to_string_func = to_string_func.Clone(cls); |
4869 enum_members.AddFunction(to_string_func); | 4869 enum_members.AddFunction(to_string_func); |
4870 | 4870 |
4871 // Clone the hashCode getter function from the helper class. | 4871 // Clone the hashCode getter function from the helper class. |
4872 Function& hash_code_func = Function::Handle(I, | 4872 Function& hash_code_func = Function::Handle(Z, |
4873 helper_class.LookupDynamicFunctionAllowPrivate(Symbols::hashCode())); | 4873 helper_class.LookupDynamicFunctionAllowPrivate(Symbols::hashCode())); |
4874 ASSERT(!hash_code_func.IsNull()); | 4874 ASSERT(!hash_code_func.IsNull()); |
4875 hash_code_func = hash_code_func.Clone(cls); | 4875 hash_code_func = hash_code_func.Clone(cls); |
4876 enum_members.AddFunction(hash_code_func); | 4876 enum_members.AddFunction(hash_code_func); |
4877 | 4877 |
4878 cls.AddFields(enum_members.fields()); | 4878 cls.AddFields(enum_members.fields()); |
4879 const Array& functions = Array::Handle(Z, enum_members.MakeFunctionsArray()); | 4879 const Array& functions = Array::Handle(Z, enum_members.MakeFunctionsArray()); |
4880 cls.SetFunctions(functions); | 4880 cls.SetFunctions(functions); |
4881 } | 4881 } |
4882 | 4882 |
(...skipping 9421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14304 void Parser::SkipQualIdent() { | 14304 void Parser::SkipQualIdent() { |
14305 ASSERT(IsIdentifier()); | 14305 ASSERT(IsIdentifier()); |
14306 ConsumeToken(); | 14306 ConsumeToken(); |
14307 if (CurrentToken() == Token::kPERIOD) { | 14307 if (CurrentToken() == Token::kPERIOD) { |
14308 ConsumeToken(); // Consume the kPERIOD token. | 14308 ConsumeToken(); // Consume the kPERIOD token. |
14309 ExpectIdentifier("identifier expected after '.'"); | 14309 ExpectIdentifier("identifier expected after '.'"); |
14310 } | 14310 } |
14311 } | 14311 } |
14312 | 14312 |
14313 } // namespace dart | 14313 } // namespace dart |
OLD | NEW |