| 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 10346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10357 Heap::kOld); | 10357 Heap::kOld); |
| 10358 return reinterpret_cast<RawLibrary*>(raw); | 10358 return reinterpret_cast<RawLibrary*>(raw); |
| 10359 } | 10359 } |
| 10360 | 10360 |
| 10361 | 10361 |
| 10362 RawLibrary* Library::NewLibraryHelper(const String& url, | 10362 RawLibrary* Library::NewLibraryHelper(const String& url, |
| 10363 bool import_core_lib) { | 10363 bool import_core_lib) { |
| 10364 Thread* thread = Thread::Current(); | 10364 Thread* thread = Thread::Current(); |
| 10365 Zone* zone = thread->zone(); | 10365 Zone* zone = thread->zone(); |
| 10366 ASSERT(thread->IsMutatorThread()); | 10366 ASSERT(thread->IsMutatorThread()); |
| 10367 // Force the url to have a hash code. |
| 10368 url.Hash(); |
| 10367 const Library& result = Library::Handle(zone, Library::New()); | 10369 const Library& result = Library::Handle(zone, Library::New()); |
| 10368 result.StorePointer(&result.raw_ptr()->name_, Symbols::Empty().raw()); | 10370 result.StorePointer(&result.raw_ptr()->name_, Symbols::Empty().raw()); |
| 10369 result.StorePointer(&result.raw_ptr()->url_, url.raw()); | 10371 result.StorePointer(&result.raw_ptr()->url_, url.raw()); |
| 10370 result.StorePointer(&result.raw_ptr()->resolved_names_, | 10372 result.StorePointer(&result.raw_ptr()->resolved_names_, |
| 10371 Object::empty_array().raw()); | 10373 Object::empty_array().raw()); |
| 10372 result.StorePointer(&result.raw_ptr()->exported_names_, | 10374 result.StorePointer(&result.raw_ptr()->exported_names_, |
| 10373 Array::null()); | 10375 Array::null()); |
| 10374 result.StorePointer(&result.raw_ptr()->dictionary_, | 10376 result.StorePointer(&result.raw_ptr()->dictionary_, |
| 10375 Object::empty_array().raw()); | 10377 Object::empty_array().raw()); |
| 10376 result.StorePointer(&result.raw_ptr()->metadata_, | 10378 result.StorePointer(&result.raw_ptr()->metadata_, |
| (...skipping 12289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22666 return UserTag::null(); | 22668 return UserTag::null(); |
| 22667 } | 22669 } |
| 22668 | 22670 |
| 22669 | 22671 |
| 22670 const char* UserTag::ToCString() const { | 22672 const char* UserTag::ToCString() const { |
| 22671 const String& tag_label = String::Handle(label()); | 22673 const String& tag_label = String::Handle(label()); |
| 22672 return tag_label.ToCString(); | 22674 return tag_label.ToCString(); |
| 22673 } | 22675 } |
| 22674 | 22676 |
| 22675 } // namespace dart | 22677 } // namespace dart |
| OLD | NEW |