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

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: address lasse and peter's comments Created 8 years 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 | « no previous file | sdk/lib/_internal/compiler/implementation/lib/js_helper.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 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() => 1000000;
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 List<E> { 157 patch class List<E> {
158 patch factory List([int length]) => Primitives.newList(length); 158 patch factory List([int length]) => Primitives.newList(length);
159 } 159 }
160 160
161 161
162 patch class String { 162 patch class String {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 patch class RegExp { 206 patch class RegExp {
207 patch factory RegExp(String pattern, 207 patch factory RegExp(String pattern,
208 {bool multiLine: false, 208 {bool multiLine: false,
209 bool ignoreCase: false}) 209 bool ignoreCase: false})
210 => new JSSyntaxRegExp(pattern, 210 => new JSSyntaxRegExp(pattern,
211 multiLine: multiLine, 211 multiLine: multiLine,
212 ignoreCase: ignoreCase); 212 ignoreCase: ignoreCase);
213 } 213 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698