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 10227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10238 if (imported.IsCoreLibrary()) { | 10238 if (imported.IsCoreLibrary()) { |
10239 return true; | 10239 return true; |
10240 } | 10240 } |
10241 } | 10241 } |
10242 } | 10242 } |
10243 return false; | 10243 return false; |
10244 } | 10244 } |
10245 | 10245 |
10246 | 10246 |
10247 void Library::DropDependencies() const { | 10247 void Library::DropDependencies() const { |
10248 StorePointer(&raw_ptr()->imports_, Array::null()); | 10248 StorePointer(&raw_ptr()->imports_, Object::empty_array().raw()); |
10249 StorePointer(&raw_ptr()->exports_, Array::null()); | 10249 StorePointer(&raw_ptr()->exports_, Object::empty_array().raw()); |
10250 } | 10250 } |
10251 | 10251 |
10252 | 10252 |
10253 void Library::AddImport(const Namespace& ns) const { | 10253 void Library::AddImport(const Namespace& ns) const { |
10254 Array& imports = Array::Handle(this->imports()); | 10254 Array& imports = Array::Handle(this->imports()); |
10255 intptr_t capacity = imports.Length(); | 10255 intptr_t capacity = imports.Length(); |
10256 if (num_imports() == capacity) { | 10256 if (num_imports() == capacity) { |
10257 capacity = capacity + kImportsCapacityIncrement; | 10257 capacity = capacity + kImportsCapacityIncrement; |
10258 imports = Array::Grow(imports, capacity); | 10258 imports = Array::Grow(imports, capacity); |
10259 StorePointer(&raw_ptr()->imports_, imports.raw()); | 10259 StorePointer(&raw_ptr()->imports_, imports.raw()); |
(...skipping 12351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22611 return UserTag::null(); | 22611 return UserTag::null(); |
22612 } | 22612 } |
22613 | 22613 |
22614 | 22614 |
22615 const char* UserTag::ToCString() const { | 22615 const char* UserTag::ToCString() const { |
22616 const String& tag_label = String::Handle(label()); | 22616 const String& tag_label = String::Handle(label()); |
22617 return tag_label.ToCString(); | 22617 return tag_label.ToCString(); |
22618 } | 22618 } |
22619 | 22619 |
22620 } // namespace dart | 22620 } // namespace dart |
OLD | NEW |