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

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

Issue 1298893003: Enable is and as checks on non-ground types (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Minor fixes Created 5 years, 4 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) 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 /* 5 /*
6 * This library encapsulates the core sdk errors that the runtime knows about. 6 * This library encapsulates the core sdk errors that the runtime knows about.
7 * 7 *
8 */ 8 */
9 9
10 dart_library.library('dart_runtime/_errors', null, /* Imports */[ 10 dart_library.library('dart_runtime/_errors', null, /* Imports */[
(...skipping 11 matching lines...) Expand all
22 22
23 function throwCastError(actual, type) { 23 function throwCastError(actual, type) {
24 operations.throw(new _js_helper.CastErrorImplementation(actual, type)); 24 operations.throw(new _js_helper.CastErrorImplementation(actual, type));
25 } 25 }
26 exports.throwCastError = throwCastError; 26 exports.throwCastError = throwCastError;
27 27
28 function throwAssertionError() { 28 function throwAssertionError() {
29 operations.throw(new core.AssertionError()); 29 operations.throw(new core.AssertionError());
30 } 30 }
31 exports.throwAssertionError = throwAssertionError; 31 exports.throwAssertionError = throwAssertionError;
32
33 function throwNullValueError() {
34 // TODO(vsm): Per spec, we should throw an NSM here. Technically, we ought
35 // to thread through method info, but that uglifies the code and can't
36 // actually be queried ... it only affects how the error is printed.
37 operations.throw(new core.NoSuchMethodError(null,
38 new core.Symbol('<Unexpected Null Value>'), null, null, null));
39 }
40 exports.throwNullValueError = throwNullValueError;
32 }); 41 });
OLDNEW
« no previous file with comments | « lib/runtime/_classes.js ('k') | lib/runtime/_operations.js » ('j') | lib/runtime/_operations.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698