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

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

Issue 1580413002: Add a `@JSExportName` annotation for internal use in the runtime (use it to export dart.assert inst… (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: made _emitTopLevelName.suffix a named arg Created 4 years, 11 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/_foreign_helper.js ('k') | lib/runtime/dart/_utils.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 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /* This library defines the representation of runtime types. 5 /* This library defines the representation of runtime types.
6 */ 6 */
7 7
8 dart_library.library('dart/_types', null, /* Imports */[ 8 dart_library.library('dart/_types', null, /* Imports */[
9 ], /* Lazy Imports */[ 9 ], /* Lazy Imports */[
10 'dart/_utils', 10 'dart/_utils',
11 'dart/core', 11 'dart/core',
12 'dart/_classes', 12 'dart/_classes',
13 'dart/_rtti' 13 'dart/_rtti'
14 ], function(exports, dart_utils, core, classes, rtti) { 14 ], function(exports, dart_utils, core, classes, rtti) {
15 'use strict'; 15 'use strict';
16 16
17 const getOwnPropertyNames = Object.getOwnPropertyNames; 17 const getOwnPropertyNames = Object.getOwnPropertyNames;
18 18
19 const assert = dart_utils.assert_; 19 const assert = dart_utils.assert;
20 20
21 /** 21 /**
22 * Types in dart are represented at runtime as follows. 22 * Types in dart are represented at runtime as follows.
23 * - Normal nominal types, produced from classes, are represented 23 * - Normal nominal types, produced from classes, are represented
24 * at runtime by the JS class of which they are an instance. 24 * at runtime by the JS class of which they are an instance.
25 * If the type is the result of instantiating a generic class, 25 * If the type is the result of instantiating a generic class,
26 * then the "classes" module manages the association between the 26 * then the "classes" module manages the association between the
27 * instantiated class and the original class declaration 27 * instantiated class and the original class declaration
28 * and the type arguments with which it was instantiated. This 28 * and the type arguments with which it was instantiated. This
29 * assocation can be queried via the "classes" module". 29 * assocation can be queried via the "classes" module".
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 let typeArgs = classes.getGenericArgs(type); 538 let typeArgs = classes.getGenericArgs(type);
539 if (!typeArgs) return true; 539 if (!typeArgs) return true;
540 for (let t of typeArgs) { 540 for (let t of typeArgs) {
541 if (t != core.Object && t != dynamicR) return false; 541 if (t != core.Object && t != dynamicR) return false;
542 } 542 }
543 return true; 543 return true;
544 } 544 }
545 exports.isGroundType = isGroundType; 545 exports.isGroundType = isGroundType;
546 546
547 }); 547 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/_foreign_helper.js ('k') | lib/runtime/dart/_utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698