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

Side by Side Diff: sdk/lib/_internal/js_runtime/lib/js_helper.dart

Issue 2855173002: Revert "Void is not required to be `null` anymore." (Closed)
Patch Set: Created 3 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 | « runtime/vm/object.cc ('k') | tests/co19/co19-co19.status » ('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 library _js_helper; 5 library _js_helper;
6 6
7 import 'dart:_js_embedded_names' 7 import 'dart:_js_embedded_names'
8 show 8 show
9 DEFERRED_LIBRARY_URIS, 9 DEFERRED_LIBRARY_URIS,
10 DEFERRED_LIBRARY_HASHES, 10 DEFERRED_LIBRARY_HASHES,
(...skipping 3397 matching lines...) Expand 10 before | Expand all | Expand 10 after
3408 if (JS('bool', '#[#]', getInterceptor(value), property)) return value; 3408 if (JS('bool', '#[#]', getInterceptor(value), property)) return value;
3409 propertyTypeError(value, property); 3409 propertyTypeError(value, property);
3410 } 3410 }
3411 3411
3412 listSuperNativeTypeCast(value, property) { 3412 listSuperNativeTypeCast(value, property) {
3413 if (value is List || value == null) return value; 3413 if (value is List || value == null) return value;
3414 if (JS('bool', '#[#]', getInterceptor(value), property)) return value; 3414 if (JS('bool', '#[#]', getInterceptor(value), property)) return value;
3415 propertyTypeCastError(value, property); 3415 propertyTypeCastError(value, property);
3416 } 3416 }
3417 3417
3418 voidTypeCheck(value) {
3419 if (value == null) return value;
3420 throw new TypeErrorImplementation(value, 'void');
3421 }
3422
3418 extractFunctionTypeObjectFrom(o) { 3423 extractFunctionTypeObjectFrom(o) {
3419 var interceptor = getInterceptor(o); 3424 var interceptor = getInterceptor(o);
3420 var signatureName = JS_GET_NAME(JsGetName.SIGNATURE_NAME); 3425 var signatureName = JS_GET_NAME(JsGetName.SIGNATURE_NAME);
3421 return JS('bool', '# in #', signatureName, interceptor) 3426 return JS('bool', '# in #', signatureName, interceptor)
3422 ? JS('', '#[#]()', interceptor, signatureName) 3427 ? JS('', '#[#]()', interceptor, signatureName)
3423 : null; 3428 : null;
3424 } 3429 }
3425 3430
3426 functionTypeTest(value, functionTypeRti) { 3431 functionTypeTest(value, functionTypeRti) {
3427 if (value == null) return false; 3432 if (value == null) return false;
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3795 // unneeded code. 3800 // unneeded code.
3796 class _UnreachableError extends AssertionError { 3801 class _UnreachableError extends AssertionError {
3797 _UnreachableError(); 3802 _UnreachableError();
3798 String toString() => "Assertion failed: Reached dead code"; 3803 String toString() => "Assertion failed: Reached dead code";
3799 } 3804 }
3800 3805
3801 @NoInline() 3806 @NoInline()
3802 void assertUnreachable() { 3807 void assertUnreachable() {
3803 throw new _UnreachableError(); 3808 throw new _UnreachableError();
3804 } 3809 }
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | tests/co19/co19-co19.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698