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

Side by Side Diff: lib/runtime/dart/_utils.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/_types.js ('k') | lib/src/codegen/js_codegen.dart » ('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.library('dart/_utils', null, /* Imports */[ 1 dart_library.library('dart/_utils', null, /* Imports */[
2 ], /* Lazy imports */[ 2 ], /* Lazy imports */[
3 ], function(exports, dart) { 3 ], function(exports, dart) {
4 'use strict'; 4 'use strict';
5 const defineProperty = Object.defineProperty; 5 const defineProperty = Object.defineProperty;
6 const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; 6 const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
7 const getOwnPropertyNames = Object.getOwnPropertyNames; 7 const getOwnPropertyNames = Object.getOwnPropertyNames;
8 const getOwnPropertySymbols = Object.getOwnPropertySymbols; 8 const getOwnPropertySymbols = Object.getOwnPropertySymbols;
9 const hasOwnProperty = Object.prototype.hasOwnProperty; 9 const hasOwnProperty = Object.prototype.hasOwnProperty;
10 const StrongModeError = (function() { 10 const StrongModeError = (function() {
11 function StrongModeError(message) { 11 function StrongModeError(message) {
12 Error.call(this); 12 Error.call(this);
13 this.message = message; 13 this.message = message;
14 } 14 }
15 ; 15 ;
16 Object.setPrototypeOf(StrongModeError.prototype, Error.prototype); 16 Object.setPrototypeOf(StrongModeError.prototype, Error.prototype);
17 return StrongModeError; 17 return StrongModeError;
18 })(); 18 })();
19 function throwStrongModeError(message) { 19 function throwStrongModeError(message) {
20 throw new StrongModeError(message); 20 throw new StrongModeError(message);
21 } 21 }
22 function throwInternalError(message) { 22 function throwInternalError(message) {
23 throw Error(message); 23 throw Error(message);
24 } 24 }
25 function assert_(condition) { 25 function assert(condition) {
26 if (!condition) throwInternalError("The compiler is broken: failed assert"); 26 if (!condition) throwInternalError("The compiler is broken: failed assert");
27 } 27 }
28 function getOwnNamesAndSymbols(obj) { 28 function getOwnNamesAndSymbols(obj) {
29 return getOwnPropertyNames(obj).concat(getOwnPropertySymbols(obj)); 29 return getOwnPropertyNames(obj).concat(getOwnPropertySymbols(obj));
30 } 30 }
31 function safeGetOwnProperty(obj, name) { 31 function safeGetOwnProperty(obj, name) {
32 let desc = getOwnPropertyDescriptor(obj, name); 32 let desc = getOwnPropertyDescriptor(obj, name);
33 if (desc) return desc.value; 33 if (desc) return desc.value;
34 } 34 }
35 function defineLazyProperty(to, name, desc) { 35 function defineLazyProperty(to, name, desc) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 // Exports: 89 // Exports:
90 exports.defineProperty = defineProperty; 90 exports.defineProperty = defineProperty;
91 exports.getOwnPropertyDescriptor = getOwnPropertyDescriptor; 91 exports.getOwnPropertyDescriptor = getOwnPropertyDescriptor;
92 exports.getOwnPropertyNames = getOwnPropertyNames; 92 exports.getOwnPropertyNames = getOwnPropertyNames;
93 exports.getOwnPropertySymbols = getOwnPropertySymbols; 93 exports.getOwnPropertySymbols = getOwnPropertySymbols;
94 exports.hasOwnProperty = hasOwnProperty; 94 exports.hasOwnProperty = hasOwnProperty;
95 exports.StrongModeError = StrongModeError; 95 exports.StrongModeError = StrongModeError;
96 exports.throwStrongModeError = throwStrongModeError; 96 exports.throwStrongModeError = throwStrongModeError;
97 exports.throwInternalError = throwInternalError; 97 exports.throwInternalError = throwInternalError;
98 exports.assert_ = assert_; 98 exports.assert = assert;
99 exports.getOwnNamesAndSymbols = getOwnNamesAndSymbols; 99 exports.getOwnNamesAndSymbols = getOwnNamesAndSymbols;
100 exports.safeGetOwnProperty = safeGetOwnProperty; 100 exports.safeGetOwnProperty = safeGetOwnProperty;
101 exports.defineLazyProperty = defineLazyProperty; 101 exports.defineLazyProperty = defineLazyProperty;
102 exports.defineLazy = defineLazy; 102 exports.defineLazy = defineLazy;
103 exports.defineMemoizedGetter = defineMemoizedGetter; 103 exports.defineMemoizedGetter = defineMemoizedGetter;
104 exports.copyTheseProperties = copyTheseProperties; 104 exports.copyTheseProperties = copyTheseProperties;
105 exports.copyProperties = copyProperties; 105 exports.copyProperties = copyProperties;
106 exports.export_ = export_; 106 exports.export_ = export_;
107 }); 107 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/_types.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698