| 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 10533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10544 | 10544 |
| 10545 | 10545 |
| 10546 // Create a private key for this library. It is based on the hash of the | 10546 // Create a private key for this library. It is based on the hash of the |
| 10547 // library URI and the sequence number of the library to guarantee unique | 10547 // library URI and the sequence number of the library to guarantee unique |
| 10548 // private keys without having to verify. | 10548 // private keys without having to verify. |
| 10549 void Library::AllocatePrivateKey() const { | 10549 void Library::AllocatePrivateKey() const { |
| 10550 Thread* thread = Thread::Current(); | 10550 Thread* thread = Thread::Current(); |
| 10551 Zone* zone = thread->zone(); | 10551 Zone* zone = thread->zone(); |
| 10552 Isolate* isolate = thread->isolate(); | 10552 Isolate* isolate = thread->isolate(); |
| 10553 | 10553 |
| 10554 if (isolate->IsReloading()) { | 10554 if (FLAG_support_reload && isolate->IsReloading()) { |
| 10555 // When reloading, we need to make sure we use the original private key | 10555 // When reloading, we need to make sure we use the original private key |
| 10556 // if this library previously existed. | 10556 // if this library previously existed. |
| 10557 IsolateReloadContext* reload_context = isolate->reload_context(); | 10557 IsolateReloadContext* reload_context = isolate->reload_context(); |
| 10558 const String& original_key = | 10558 const String& original_key = |
| 10559 String::Handle(reload_context->FindLibraryPrivateKey(*this)); | 10559 String::Handle(reload_context->FindLibraryPrivateKey(*this)); |
| 10560 if (!original_key.IsNull()) { | 10560 if (!original_key.IsNull()) { |
| 10561 StorePointer(&raw_ptr()->private_key_, original_key.raw()); | 10561 StorePointer(&raw_ptr()->private_key_, original_key.raw()); |
| 10562 return; | 10562 return; |
| 10563 } | 10563 } |
| 10564 } | 10564 } |
| (...skipping 12101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22666 return UserTag::null(); | 22666 return UserTag::null(); |
| 22667 } | 22667 } |
| 22668 | 22668 |
| 22669 | 22669 |
| 22670 const char* UserTag::ToCString() const { | 22670 const char* UserTag::ToCString() const { |
| 22671 const String& tag_label = String::Handle(label()); | 22671 const String& tag_label = String::Handle(label()); |
| 22672 return tag_label.ToCString(); | 22672 return tag_label.ToCString(); |
| 22673 } | 22673 } |
| 22674 | 22674 |
| 22675 } // namespace dart | 22675 } // namespace dart |
| OLD | NEW |