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/become.h" | 10 #include "vm/become.h" |
(...skipping 7157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7168 // the parent. | 7168 // the parent. |
7169 fun = fun.parent_function(); | 7169 fun = fun.parent_function(); |
7170 } | 7170 } |
7171 result = String::Concat(Symbols::Dot(), result, Heap::kOld); | 7171 result = String::Concat(Symbols::Dot(), result, Heap::kOld); |
7172 result = String::Concat(String::Handle(fun.UserVisibleName()), result, | 7172 result = String::Concat(String::Handle(fun.UserVisibleName()), result, |
7173 Heap::kOld); | 7173 Heap::kOld); |
7174 } | 7174 } |
7175 } | 7175 } |
7176 const Class& cls = Class::Handle(Owner()); | 7176 const Class& cls = Class::Handle(Owner()); |
7177 if (!cls.IsTopLevel()) { | 7177 if (!cls.IsTopLevel()) { |
7178 result = String::Concat(Symbols::Dot(), result, Heap::kOld); | 7178 if (fun.kind() == RawFunction::kConstructor) { |
7179 const String& cls_name = String::Handle(name_visibility == kScrubbedName | 7179 result = String::Concat(Symbols::ConstructorStacktracePrefix(), result, |
7180 ? cls.ScrubbedName() | 7180 Heap::kOld); |
7181 : cls.UserVisibleName()); | 7181 } else { |
7182 result = String::Concat(cls_name, result, Heap::kOld); | 7182 result = String::Concat(Symbols::Dot(), result, Heap::kOld); |
| 7183 const String& cls_name = String::Handle(name_visibility == kScrubbedName |
| 7184 ? cls.ScrubbedName() |
| 7185 : cls.UserVisibleName()); |
| 7186 result = String::Concat(cls_name, result, Heap::kOld); |
| 7187 } |
7183 } | 7188 } |
7184 return result.raw(); | 7189 return result.raw(); |
7185 } | 7190 } |
7186 | 7191 |
7187 | 7192 |
7188 RawString* Function::GetSource() const { | 7193 RawString* Function::GetSource() const { |
7189 if (IsImplicitConstructor() || IsSignatureFunction()) { | 7194 if (IsImplicitConstructor() || IsSignatureFunction()) { |
7190 // We may need to handle more cases when the restrictions on mixins are | 7195 // We may need to handle more cases when the restrictions on mixins are |
7191 // relaxed. In particular we might start associating some source with the | 7196 // relaxed. In particular we might start associating some source with the |
7192 // forwarding constructors when it becomes possible to specify a particular | 7197 // forwarding constructors when it becomes possible to specify a particular |
(...skipping 15993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
23186 return UserTag::null(); | 23191 return UserTag::null(); |
23187 } | 23192 } |
23188 | 23193 |
23189 | 23194 |
23190 const char* UserTag::ToCString() const { | 23195 const char* UserTag::ToCString() const { |
23191 const String& tag_label = String::Handle(label()); | 23196 const String& tag_label = String::Handle(label()); |
23192 return tag_label.ToCString(); | 23197 return tag_label.ToCString(); |
23193 } | 23198 } |
23194 | 23199 |
23195 } // namespace dart | 23200 } // namespace dart |
OLD | NEW |