| 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 7151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7162 return String::Concat(Symbols::SetterPrefix(), field_name); | 7162 return String::Concat(Symbols::SetterPrefix(), field_name); |
| 7163 } | 7163 } |
| 7164 | 7164 |
| 7165 | 7165 |
| 7166 RawString* Field::SetterSymbol(const String& field_name) { | 7166 RawString* Field::SetterSymbol(const String& field_name) { |
| 7167 return Symbols::FromConcat(Symbols::SetterPrefix(), field_name); | 7167 return Symbols::FromConcat(Symbols::SetterPrefix(), field_name); |
| 7168 } | 7168 } |
| 7169 | 7169 |
| 7170 | 7170 |
| 7171 RawString* Field::NameFromGetter(const String& getter_name) { | 7171 RawString* Field::NameFromGetter(const String& getter_name) { |
| 7172 return String::SubString(getter_name, strlen(kGetterPrefix)); | 7172 return Symbols::New(getter_name, kGetterPrefixLength, |
| 7173 getter_name.Length() - kGetterPrefixLength); |
| 7173 } | 7174 } |
| 7174 | 7175 |
| 7175 | 7176 |
| 7176 RawString* Field::NameFromSetter(const String& setter_name) { | 7177 RawString* Field::NameFromSetter(const String& setter_name) { |
| 7177 return String::SubString(setter_name, strlen(kSetterPrefix)); | 7178 return Symbols::New(setter_name, kSetterPrefixLength, |
| 7179 setter_name.Length() - kSetterPrefixLength); |
| 7178 } | 7180 } |
| 7179 | 7181 |
| 7180 | 7182 |
| 7181 bool Field::IsGetterName(const String& function_name) { | 7183 bool Field::IsGetterName(const String& function_name) { |
| 7182 return function_name.StartsWith(Symbols::GetterPrefix()); | 7184 return function_name.StartsWith(Symbols::GetterPrefix()); |
| 7183 } | 7185 } |
| 7184 | 7186 |
| 7185 | 7187 |
| 7186 bool Field::IsSetterName(const String& function_name) { | 7188 bool Field::IsSetterName(const String& function_name) { |
| 7187 return function_name.StartsWith(Symbols::SetterPrefix()); | 7189 return function_name.StartsWith(Symbols::SetterPrefix()); |
| (...skipping 14197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21385 return tag_label.ToCString(); | 21387 return tag_label.ToCString(); |
| 21386 } | 21388 } |
| 21387 | 21389 |
| 21388 | 21390 |
| 21389 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21391 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 21390 Instance::PrintJSONImpl(stream, ref); | 21392 Instance::PrintJSONImpl(stream, ref); |
| 21391 } | 21393 } |
| 21392 | 21394 |
| 21393 | 21395 |
| 21394 } // namespace dart | 21396 } // namespace dart |
| OLD | NEW |