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

Side by Side Diff: tool/input_sdk/private/js_helper.dart

Issue 1170813008: fixes detection of SDK libraries (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: format 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library _js_helper; 5 library dart._js_helper;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'dart:_foreign_helper' show 9 import 'dart:_foreign_helper' show
10 JS, 10 JS,
11 JS_STRING_CONCAT; 11 JS_STRING_CONCAT;
12 12
13 import 'dart:_interceptors'; 13 import 'dart:_interceptors';
14 14
15 part 'annotations.dart'; 15 part 'annotations.dart';
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 int random64() { 769 int random64() {
770 // TODO(lrn): Use a secure random source. 770 // TODO(lrn): Use a secure random source.
771 int int32a = JS("int", "(Math.random() * 0x100000000) >>> 0"); 771 int int32a = JS("int", "(Math.random() * 0x100000000) >>> 0");
772 int int32b = JS("int", "(Math.random() * 0x100000000) >>> 0"); 772 int int32b = JS("int", "(Math.random() * 0x100000000) >>> 0");
773 return int32a + int32b * 0x100000000; 773 return int32a + int32b * 0x100000000;
774 } 774 }
775 775
776 String jsonEncodeNative(String string) { 776 String jsonEncodeNative(String string) {
777 return JS("String", "JSON.stringify(#)", string); 777 return JS("String", "JSON.stringify(#)", string);
778 } 778 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698