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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/lib/core_patch.dart

Issue 11417110: Let stopwatch use window.performance.now when available. Fix for: http://code.google.com/p/dart/iss… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 file for dart:core classes. 5 // Patch file for dart:core classes.
6 6
7 // Patch for 'print' function. 7 // Patch for 'print' function.
8 patch void print(var object) { 8 patch void print(var object) {
9 if (object is String) { 9 if (object is String) {
10 Primitives.printString(object); 10 Primitives.printString(object);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 patch int get second => Primitives.getSeconds(this); 141 patch int get second => Primitives.getSeconds(this);
142 142
143 patch int get millisecond => Primitives.getMilliseconds(this); 143 patch int get millisecond => Primitives.getMilliseconds(this);
144 144
145 patch int get weekday => Primitives.getWeekday(this); 145 patch int get weekday => Primitives.getWeekday(this);
146 } 146 }
147 147
148 148
149 // Patch for Stopwatch implementation. 149 // Patch for Stopwatch implementation.
150 patch class _StopwatchImpl { 150 patch class _StopwatchImpl {
151 patch static int _frequency() => 1000; 151 patch static int _frequency() => 1000;
kasperl 2012/11/21 10:27:57 Wouldn't it be nicer if we returned 1000000 if we
152 patch static int _now() => Primitives.dateNow(); 152 patch static int _now() => Primitives.numMicroseconds();
153 } 153 }
154 154
155 155
156 // Patch for List implementation. 156 // Patch for List implementation.
157 patch class _ListImpl<E> { 157 patch class _ListImpl<E> {
158 patch factory List([int length]) => Primitives.newList(length); 158 patch factory List([int length]) => Primitives.newList(length);
159 159
160 patch factory List.from(Iterable<E> other) { 160 patch factory List.from(Iterable<E> other) {
161 var result = new List(); 161 var result = new List();
162 for (var element in other) { 162 for (var element in other) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 213
214 patch class RegExp { 214 patch class RegExp {
215 patch factory RegExp(String pattern, 215 patch factory RegExp(String pattern,
216 {bool multiLine: false, 216 {bool multiLine: false,
217 bool ignoreCase: false}) 217 bool ignoreCase: false})
218 => new JSSyntaxRegExp(pattern, 218 => new JSSyntaxRegExp(pattern,
219 multiLine: multiLine, 219 multiLine: multiLine,
220 ignoreCase: ignoreCase); 220 ignoreCase: ignoreCase);
221 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698