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 10658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10669 intptr_t hash_value = url.Hash() & hash_mask; | 10669 intptr_t hash_value = url.Hash() & hash_mask; |
10670 | 10670 |
10671 const GrowableObjectArray& libs = GrowableObjectArray::Handle(zone, | 10671 const GrowableObjectArray& libs = GrowableObjectArray::Handle(zone, |
10672 isolate->object_store()->libraries()); | 10672 isolate->object_store()->libraries()); |
10673 intptr_t sequence_value = libs.Length(); | 10673 intptr_t sequence_value = libs.Length(); |
10674 | 10674 |
10675 char private_key[32]; | 10675 char private_key[32]; |
10676 OS::SNPrint(private_key, sizeof(private_key), | 10676 OS::SNPrint(private_key, sizeof(private_key), |
10677 "%c%" Pd "%06" Pd "", | 10677 "%c%" Pd "%06" Pd "", |
10678 kPrivateKeySeparator, sequence_value, hash_value); | 10678 kPrivateKeySeparator, sequence_value, hash_value); |
10679 StorePointer(&raw_ptr()->private_key_, String::New(private_key, Heap::kOld)); | 10679 const String& key = String::Handle(zone, String::New(private_key, |
| 10680 Heap::kOld)); |
| 10681 key.Hash(); // This string may end up in the VM isolate. |
| 10682 StorePointer(&raw_ptr()->private_key_, key.raw()); |
10680 } | 10683 } |
10681 | 10684 |
10682 | 10685 |
10683 const String& Library::PrivateCoreLibName(const String& member) { | 10686 const String& Library::PrivateCoreLibName(const String& member) { |
10684 const Library& core_lib = Library::Handle(Library::CoreLibrary()); | 10687 const Library& core_lib = Library::Handle(Library::CoreLibrary()); |
10685 const String& private_name = String::ZoneHandle(core_lib.PrivateName(member)); | 10688 const String& private_name = String::ZoneHandle(core_lib.PrivateName(member)); |
10686 return private_name; | 10689 return private_name; |
10687 } | 10690 } |
10688 | 10691 |
10689 | 10692 |
(...skipping 11762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22452 return UserTag::null(); | 22455 return UserTag::null(); |
22453 } | 22456 } |
22454 | 22457 |
22455 | 22458 |
22456 const char* UserTag::ToCString() const { | 22459 const char* UserTag::ToCString() const { |
22457 const String& tag_label = String::Handle(label()); | 22460 const String& tag_label = String::Handle(label()); |
22458 return tag_label.ToCString(); | 22461 return tag_label.ToCString(); |
22459 } | 22462 } |
22460 | 22463 |
22461 } // namespace dart | 22464 } // namespace dart |
OLD | NEW |