Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 10942025: Convert String and List to abstract classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated to tip-of-tree. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698