| 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 6997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7008 static RawString* MakeFunctionMetaName(const Function& func) { | 7008 static RawString* MakeFunctionMetaName(const Function& func) { |
| 7009 const String& cname = | 7009 const String& cname = |
| 7010 String::Handle(MakeClassMetaName(Class::Handle(func.origin()))); | 7010 String::Handle(MakeClassMetaName(Class::Handle(func.origin()))); |
| 7011 String& fname = String::Handle(func.name()); | 7011 String& fname = String::Handle(func.name()); |
| 7012 fname = String::Concat(Symbols::At(), fname); | 7012 fname = String::Concat(Symbols::At(), fname); |
| 7013 return String::Concat(cname, fname); | 7013 return String::Concat(cname, fname); |
| 7014 } | 7014 } |
| 7015 | 7015 |
| 7016 | 7016 |
| 7017 static RawString* MakeTypeParameterMetaName(const TypeParameter& param) { | 7017 static RawString* MakeTypeParameterMetaName(const TypeParameter& param) { |
| 7018 const Array& parts = Array::Handle(Array::New(3)); | 7018 const String& cname = String::Handle( |
| 7019 String& part = String::Handle(); | 7019 MakeClassMetaName(Class::Handle(param.parameterized_class()))); |
| 7020 part ^= MakeClassMetaName(Class::Handle(param.parameterized_class())); | 7020 String& pname = String::Handle(param.name()); |
| 7021 parts.SetAt(0, part); | 7021 pname = String::Concat(Symbols::At(), pname); |
| 7022 // We need to choose something different from field/function names, because it | 7022 return String::Concat(cname, pname); |
| 7023 // is allowed to have type parameters and fields/functions with the same name | |
| 7024 // in a class. | |
| 7025 parts.SetAt(1, Symbols::Slash()); | |
| 7026 part ^= param.name(); | |
| 7027 parts.SetAt(2, part); | |
| 7028 return String::ConcatAll(parts); | |
| 7029 } | 7023 } |
| 7030 | 7024 |
| 7031 | 7025 |
| 7032 void Library::AddMetadata(const Class& cls, | 7026 void Library::AddMetadata(const Class& cls, |
| 7033 const String& name, | 7027 const String& name, |
| 7034 intptr_t token_pos) const { | 7028 intptr_t token_pos) const { |
| 7035 const String& metaname = String::Handle(Symbols::New(name)); | 7029 const String& metaname = String::Handle(Symbols::New(name)); |
| 7036 Field& field = Field::Handle(Field::New(metaname, | 7030 Field& field = Field::Handle(Field::New(metaname, |
| 7037 true, // is_static | 7031 true, // is_static |
| 7038 false, // is_final | 7032 false, // is_final |
| (...skipping 8526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15565 return "_MirrorReference"; | 15559 return "_MirrorReference"; |
| 15566 } | 15560 } |
| 15567 | 15561 |
| 15568 | 15562 |
| 15569 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 15563 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 15570 JSONObject jsobj(stream); | 15564 JSONObject jsobj(stream); |
| 15571 } | 15565 } |
| 15572 | 15566 |
| 15573 | 15567 |
| 15574 } // namespace dart | 15568 } // namespace dart |
| OLD | NEW |