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

Side by Side Diff: frog/leg/lib/core.dart

Issue 9382041: Support getting of static functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 void print(var obj) { 5 void print(var obj) {
6 obj = obj.toString(); 6 obj = obj.toString();
7 var hasConsole = JS("bool", @"typeof console == 'object'"); 7 var hasConsole = JS("bool", @"typeof console == 'object'");
8 if (hasConsole) { 8 if (hasConsole) {
9 JS("void", @"console.log($0)", obj); 9 JS("void", @"console.log($0)", obj);
10 } else { 10 } else {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 if (JS("bool", @"typeof $0 == 'object'", value)) { 269 if (JS("bool", @"typeof $0 == 'object'", value)) {
270 if (isJSArray(value)) { 270 if (isJSArray(value)) {
271 return "Instance of 'List'"; 271 return "Instance of 'List'";
272 } 272 }
273 return UNINTERCEPTED(value.toString()); 273 return UNINTERCEPTED(value.toString());
274 } 274 }
275 if (JS("bool", @"$0 === 0 && (1 / $0) < 0", value)) { 275 if (JS("bool", @"$0 === 0 && (1 / $0) < 0", value)) {
276 return "-0.0"; 276 return "-0.0";
277 } 277 }
278 if (value === null) return "null"; 278 if (value === null) return "null";
279 if (JS("bool", @"typeof $0 == 'function'", value)) {
280 return "Closure";
281 }
279 return JS("string", @"String($0)", value); 282 return JS("string", @"String($0)", value);
280 } 283 }
281 284
282 285
283 builtin$iterator$0(var receiver) { 286 builtin$iterator$0(var receiver) {
284 if (isJSArray(receiver)) { 287 if (isJSArray(receiver)) {
285 return new ListIterator(receiver); 288 return new ListIterator(receiver);
286 } 289 }
287 return UNINTERCEPTED(receiver.iterator()); 290 return UNINTERCEPTED(receiver.iterator());
288 } 291 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 } else { 450 } else {
448 return 451 return
449 JS("num", @"Math.floor($0 + (Date.now() - $1))", elapsedMs, startMs); 452 JS("num", @"Math.floor($0 + (Date.now() - $1))", elapsedMs, startMs);
450 } 453 }
451 } 454 }
452 455
453 int frequency() { 456 int frequency() {
454 return 1000; 457 return 1000;
455 } 458 }
456 } 459 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698