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

Side by Side Diff: lib/runtime/dart/_js_primitives.js

Issue 1182653002: Refactor runtime into libraries, better type reps (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Address comments 2 Created 5 years, 6 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
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | lib/runtime/dart/_native_typed_data.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart.library('dart/_js_primitives', null, /* Imports */[ 1 dart_library.library('dart/_js_primitives', null, /* Imports */[
2 "dart_runtime/dart",
2 'dart/core' 3 'dart/core'
3 ], /* Lazy imports */[ 4 ], /* Lazy imports */[
4 ], function(exports, core) { 5 ], function(exports, dart, core) {
5 'use strict'; 6 'use strict';
7 let dartx = dart.dartx;
6 function printString(string) { 8 function printString(string) {
7 if (typeof dartPrint == "function") { 9 if (typeof dartPrint == "function") {
8 dartPrint(string); 10 dartPrint(string);
9 return; 11 return;
10 } 12 }
11 if (typeof console == "object" && typeof console.log != "undefined") { 13 if (typeof console == "object" && typeof console.log != "undefined") {
12 console.log(string); 14 console.log(string);
13 return; 15 return;
14 } 16 }
15 if (typeof window == "object") { 17 if (typeof window == "object") {
16 return; 18 return;
17 } 19 }
18 if (typeof print == "function") { 20 if (typeof print == "function") {
19 print(string); 21 print(string);
20 return; 22 return;
21 } 23 }
22 throw "Unable to print message: " + String(string); 24 throw "Unable to print message: " + String(string);
23 } 25 }
24 dart.fn(printString, dart.void, [core.String]); 26 dart.fn(printString, dart.void, [core.String]);
25 // Exports: 27 // Exports:
26 exports.printString = printString; 28 exports.printString = printString;
27 }); 29 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | lib/runtime/dart/_native_typed_data.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698