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

Unified Diff: runtime/lib/array.dart

Issue 14703005: Added Object._cid getter, optimized it. Added to (some) classes a static final _clCid. Use those to… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/growable_array.dart » ('j') | runtime/lib/growable_array.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array.dart
===================================================================
--- runtime/lib/array.dart (revision 22603)
+++ runtime/lib/array.dart (working copy)
@@ -5,6 +5,7 @@
// TODO(srdjan): Use shared array implementation.
class _ObjectArray<E> implements List<E> {
+ static final int _clCid = (new List(0))._cid;
siva 2013/05/13 20:38:00 clCid seems redundant 'class class id' maybe _clas
Ivan Posva 2013/05/13 22:12:37 I really like the suggestion of _classId. Also ple
srdjan 2013/05/14 17:46:31 Done.
srdjan 2013/05/14 17:46:31 Done.
factory _ObjectArray(length) native "ObjectArray_allocate";
@@ -275,6 +276,7 @@
// implementation (checks when modifying). We should keep watching
// the inline cache misses.
class _ImmutableArray<E> implements List<E> {
+ static final int _clCid = (const [])._cid;
factory _ImmutableArray._uninstantiable() {
throw new UnsupportedError(
« no previous file with comments | « no previous file | runtime/lib/growable_array.dart » ('j') | runtime/lib/growable_array.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698