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

Side by Side Diff: runtime/lib/object_patch.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/object.cc ('k') | runtime/lib/string_patch.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 patch class Object { 5 patch class Object {
6 6
7 // Helpers used to implement hashCode. If a hashCode is used we remember it 7 // Helpers used to implement hashCode. If a hashCode is used we remember it
8 // using an Expando object. A new hashCode value is calculated using a Random 8 // using an Expando object. A new hashCode value is calculated using a Random
9 // number generator. 9 // number generator.
10 static Expando _hashCodeExp = new Expando("Object.hashCode"); 10 static Expando _hashCodeExp = new Expando("Object.hashCode");
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // feedback. Returns receiver. 55 // feedback. Returns receiver.
56 _as(instantiator, instantiator_type_arguments, type) native "Object_as"; 56 _as(instantiator, instantiator_type_arguments, type) native "Object_as";
57 57
58 static _symbolMapToStringMap(Map<Symbol, dynamic> map) { 58 static _symbolMapToStringMap(Map<Symbol, dynamic> map) {
59 var result = new Map<String, dynamic>(); 59 var result = new Map<String, dynamic>();
60 map.forEach((Symbol key, value) { 60 map.forEach((Symbol key, value) {
61 result[_collection_dev.Symbol.getName(key)] = value; 61 result[_collection_dev.Symbol.getName(key)] = value;
62 }); 62 });
63 return result; 63 return result;
64 } 64 }
65
66 int get _cid native "Object_cid";
65 } 67 }
OLDNEW
« no previous file with comments | « runtime/lib/object.cc ('k') | runtime/lib/string_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698