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

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

Issue 1944483002: Redo how Type objects are exposed from DDC. (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: More tweaks. Created 4 years, 7 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 | « tool/input_sdk/private/js_helper.dart ('k') | tool/patch_sdk.sh » ('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) 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 part of dart._js_helper; 5 part of dart._js_helper;
6 6
7 // TODO(leafp): Maybe get rid of this? Currently used by the interceptors 7 // TODO(leafp): Maybe get rid of this? Currently used by the interceptors
8 // library, but that should probably be culled as well. 8 // library, but that should probably be culled as well.
9 Type getRuntimeType(var object) => 9 Type getRuntimeType(var object) =>
10 JS('Type|null', 'dart.realRuntimeType(#)', object); 10 JS('Type|null', 'dart.getReifiedType(#)', object);
11 11
12 /// Returns the property [index] of the JavaScript array [array]. 12 /// Returns the property [index] of the JavaScript array [array].
13 getIndex(var array, int index) { 13 getIndex(var array, int index) {
14 assert_(isJsArray(array)); 14 assert_(isJsArray(array));
15 return JS('var', r'#[#]', array, index); 15 return JS('var', r'#[#]', array, index);
16 } 16 }
17 17
18 /// Returns the length of the JavaScript array [array]. 18 /// Returns the length of the JavaScript array [array].
19 int getLength(var array) { 19 int getLength(var array) {
20 assert_(isJsArray(array)); 20 assert_(isJsArray(array));
21 return JS('int', r'#.length', array); 21 return JS('int', r'#.length', array);
22 } 22 }
23 23
24 /// Returns whether [value] is a JavaScript array. 24 /// Returns whether [value] is a JavaScript array.
25 bool isJsArray(var value) { 25 bool isJsArray(var value) {
26 return value is JSArray; 26 return value is JSArray;
27 } 27 }
OLDNEW
« no previous file with comments | « tool/input_sdk/private/js_helper.dart ('k') | tool/patch_sdk.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698