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

Side by Side Diff: runtime/lib/object_patch.dart

Issue 22640019: Fix for running with --throw_on_javascript_int_overflow: recognize pattern (a << b) & mask and test… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 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 // in a weak table in the VM. A new hashCode value is calculated using a 8 // in a weak table in the VM. A new hashCode value is calculated using a
9 // number generator. 9 // number generator.
10 static final _hashCodeRnd = new Random(); 10 static final _hashCodeRnd = new Random();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 static _symbolMapToStringMap(Map<Symbol, dynamic> map) { 64 static _symbolMapToStringMap(Map<Symbol, dynamic> map) {
65 var result = new Map<String, dynamic>(); 65 var result = new Map<String, dynamic>();
66 map.forEach((Symbol key, value) { 66 map.forEach((Symbol key, value) {
67 result[_collection_dev.Symbol.getName(key)] = value; 67 result[_collection_dev.Symbol.getName(key)] = value;
68 }); 68 });
69 return result; 69 return result;
70 } 70 }
71 71
72 int get _cid native "Object_cid"; 72 int get _cid native "Object_cid";
73
74 _leftShiftWithMask32(count, mask) {
75 return (this << count) & mask;
76 }
73 } 77 }
OLDNEW
« no previous file with comments | « runtime/lib/integers.dart ('k') | runtime/vm/ast.h » ('j') | runtime/vm/ast.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698