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 7129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7140 // the parent. | 7140 // the parent. |
7141 fun = fun.parent_function(); | 7141 fun = fun.parent_function(); |
7142 } | 7142 } |
7143 result = String::Concat(Symbols::Dot(), result, Heap::kOld); | 7143 result = String::Concat(Symbols::Dot(), result, Heap::kOld); |
7144 result = String::Concat(String::Handle(fun.UserVisibleName()), result, | 7144 result = String::Concat(String::Handle(fun.UserVisibleName()), result, |
7145 Heap::kOld); | 7145 Heap::kOld); |
7146 } | 7146 } |
7147 } | 7147 } |
7148 const Class& cls = Class::Handle(Owner()); | 7148 const Class& cls = Class::Handle(Owner()); |
7149 if (!cls.IsTopLevel()) { | 7149 if (!cls.IsTopLevel()) { |
7150 result = String::Concat(Symbols::Dot(), result, Heap::kOld); | 7150 if (kind() == RawFunction::kConstructor) { |
7151 const String& cls_name = String::Handle(name_visibility == kScrubbedName | 7151 result = String::Concat(Symbols::ConstructorStacktracePrefix(), result, |
7152 ? cls.ScrubbedName() | 7152 Heap::kOld); |
7153 : cls.UserVisibleName()); | 7153 } else { |
7154 result = String::Concat(cls_name, result, Heap::kOld); | 7154 result = String::Concat(Symbols::Dot(), result, Heap::kOld); |
| 7155 const String& cls_name = String::Handle(name_visibility == kScrubbedName |
| 7156 ? cls.ScrubbedName() |
| 7157 : cls.UserVisibleName()); |
| 7158 result = String::Concat(cls_name, result, Heap::kOld); |
| 7159 } |
7155 } | 7160 } |
7156 return result.raw(); | 7161 return result.raw(); |
7157 } | 7162 } |
7158 | 7163 |
7159 | 7164 |
7160 RawString* Function::GetSource() const { | 7165 RawString* Function::GetSource() const { |
7161 if (IsImplicitConstructor() || IsSignatureFunction()) { | 7166 if (IsImplicitConstructor() || IsSignatureFunction()) { |
7162 // We may need to handle more cases when the restrictions on mixins are | 7167 // We may need to handle more cases when the restrictions on mixins are |
7163 // relaxed. In particular we might start associating some source with the | 7168 // relaxed. In particular we might start associating some source with the |
7164 // forwarding constructors when it becomes possible to specify a particular | 7169 // forwarding constructors when it becomes possible to specify a particular |
(...skipping 15982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
23147 return UserTag::null(); | 23152 return UserTag::null(); |
23148 } | 23153 } |
23149 | 23154 |
23150 | 23155 |
23151 const char* UserTag::ToCString() const { | 23156 const char* UserTag::ToCString() const { |
23152 const String& tag_label = String::Handle(label()); | 23157 const String& tag_label = String::Handle(label()); |
23153 return tag_label.ToCString(); | 23158 return tag_label.ToCString(); |
23154 } | 23159 } |
23155 | 23160 |
23156 } // namespace dart | 23161 } // namespace dart |
OLD | NEW |