| 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
| (...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 } | 1757 } |
| 1758 | 1758 |
| 1759 | 1759 |
| 1760 // --- Lists --- | 1760 // --- Lists --- |
| 1761 | 1761 |
| 1762 | 1762 |
| 1763 static RawInstance* GetListInstance(Isolate* isolate, const Object& obj) { | 1763 static RawInstance* GetListInstance(Isolate* isolate, const Object& obj) { |
| 1764 if (obj.IsInstance()) { | 1764 if (obj.IsInstance()) { |
| 1765 const Instance& instance = Instance::Cast(obj); | 1765 const Instance& instance = Instance::Cast(obj); |
| 1766 const Type& type = | 1766 const Type& type = |
| 1767 Type::Handle(isolate, isolate->object_store()->list_interface()); | 1767 Type::Handle(isolate, isolate->object_store()->list_type()); |
| 1768 Error& malformed_type_error = Error::Handle(isolate); | 1768 Error& malformed_type_error = Error::Handle(isolate); |
| 1769 if (instance.IsInstanceOf(type, | 1769 if (instance.IsInstanceOf(type, |
| 1770 TypeArguments::Handle(isolate), | 1770 TypeArguments::Handle(isolate), |
| 1771 &malformed_type_error)) { | 1771 &malformed_type_error)) { |
| 1772 ASSERT(malformed_type_error.IsNull()); // Type is a raw List. | 1772 ASSERT(malformed_type_error.IsNull()); // Type is a raw List. |
| 1773 return instance.raw(); | 1773 return instance.raw(); |
| 1774 } | 1774 } |
| 1775 } | 1775 } |
| 1776 return Instance::null(); | 1776 return Instance::null(); |
| 1777 } | 1777 } |
| (...skipping 2713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4491 } | 4491 } |
| 4492 { | 4492 { |
| 4493 NoGCScope no_gc; | 4493 NoGCScope no_gc; |
| 4494 RawObject* raw_obj = obj.raw(); | 4494 RawObject* raw_obj = obj.raw(); |
| 4495 isolate->heap()->SetPeer(raw_obj, peer); | 4495 isolate->heap()->SetPeer(raw_obj, peer); |
| 4496 } | 4496 } |
| 4497 return Api::Success(isolate); | 4497 return Api::Success(isolate); |
| 4498 } | 4498 } |
| 4499 | 4499 |
| 4500 } // namespace dart | 4500 } // namespace dart |
| OLD | NEW |