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

Side by Side Diff: lib/runtime/dart_runtime.js

Issue 971823002: rename `as` helper to make tools happy (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | 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 var dart; 5 var dart;
6 (function (dart) { 6 (function (dart) {
7 var defineProperty = Object.defineProperty; 7 var defineProperty = Object.defineProperty;
8 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; 8 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
9 var getOwnPropertyNames = Object.getOwnPropertyNames; 9 var getOwnPropertyNames = Object.getOwnPropertyNames;
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 function dsetindex(obj, index, value) { 86 function dsetindex(obj, index, value) {
87 return checkAndCall(obj.set, obj, [index, value], '[]='); 87 return checkAndCall(obj.set, obj, [index, value], '[]=');
88 } 88 }
89 dart.dsetindex = dindex; 89 dart.dsetindex = dindex;
90 90
91 function dbinary(left, op, right) { 91 function dbinary(left, op, right) {
92 return checkAndCall(left[op], left, [right], op); 92 return checkAndCall(left[op], left, [right], op);
93 } 93 }
94 dart.dbinary = dbinary; 94 dart.dbinary = dbinary;
95 95
96 function as(obj, type) { 96 function as_(obj, type) {
97 // TODO(vsm): Implement. 97 // TODO(vsm): Implement.
98 // if (obj == null || is(obj, type)) return obj; 98 // if (obj == null || is(obj, type)) return obj;
99 // throw new core.CastError(); 99 // throw new core.CastError();
100 return obj; 100 return obj;
101 } 101 }
102 dart.as = as; 102 dart.as = as_;
103 103
104 function is(obj, type) { 104 function is(obj, type) {
105 // TODO(vsm): Implement. 105 // TODO(vsm): Implement.
106 throw new core.UnimplementedError(); 106 throw new core.UnimplementedError();
107 } 107 }
108 dart.is = is; 108 dart.is = is;
109 109
110 function isGroundType(type) { 110 function isGroundType(type) {
111 // TODO(vsm): Implement. 111 // TODO(vsm): Implement.
112 throw new core.UnimplementedError(); 112 throw new core.UnimplementedError();
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 var init = this[name]; 348 var init = this[name];
349 var result = void 0; 349 var result = void 0;
350 if (init) result = init.apply(this, arguments); 350 if (init) result = init.apply(this, arguments);
351 return result === void 0 ? this : result; 351 return result === void 0 ? this : result;
352 }; 352 };
353 // The initializer for dart.Object 353 // The initializer for dart.Object
354 dart.Object.prototype.Object = function() {}; 354 dart.Object.prototype.Object = function() {};
355 dart.Object.prototype.constructor = dart.Object; 355 dart.Object.prototype.constructor = dart.Object;
356 356
357 })(dart || (dart = {})); 357 })(dart || (dart = {}));
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698