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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2718513002: Void is not required to be `null` anymore. (Closed)
Patch Set: Fix more places in the VM. Created 3 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_backend.backend; 5 library js_backend.backend;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
10 10
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after
2071 transformed, impacts.functionTypeCheck); 2071 transformed, impacts.functionTypeCheck);
2072 } 2072 }
2073 if (type.element != null && backend.isNative(type.element)) { 2073 if (type.element != null && backend.isNative(type.element)) {
2074 backendUsage.registerBackendImpact(transformed, impacts.nativeTypeCheck); 2074 backendUsage.registerBackendImpact(transformed, impacts.nativeTypeCheck);
2075 } 2075 }
2076 } 2076 }
2077 2077
2078 void onIsCheckForCodegen( 2078 void onIsCheckForCodegen(
2079 ResolutionDartType type, TransformedWorldImpact transformed) { 2079 ResolutionDartType type, TransformedWorldImpact transformed) {
2080 if (type.isDynamic) return; 2080 if (type.isDynamic) return;
2081 if (type.isVoid) return;
2081 type = type.unaliased; 2082 type = type.unaliased;
2082 backendUsage.registerBackendImpact(transformed, impacts.typeCheck); 2083 backendUsage.registerBackendImpact(transformed, impacts.typeCheck);
2083 2084
2084 bool inCheckedMode = backend.compiler.options.enableTypeAssertions; 2085 bool inCheckedMode = backend.compiler.options.enableTypeAssertions;
2085 // [registerIsCheck] is also called for checked mode checks, so we 2086 // [registerIsCheck] is also called for checked mode checks, so we
2086 // need to register checked mode helpers. 2087 // need to register checked mode helpers.
2087 if (inCheckedMode) { 2088 if (inCheckedMode) {
2088 // All helpers are added to resolution queue in enqueueHelpers. These 2089 // All helpers are added to resolution queue in enqueueHelpers. These
2089 // calls to [enqueue] with the resolution enqueuer serve as assertions 2090 // calls to [enqueue] with the resolution enqueuer serve as assertions
2090 // that the helper was in fact added. 2091 // that the helper was in fact added.
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
2721 WorldImpact registerInstantiatedClass(ClassEntity cls) { 2722 WorldImpact registerInstantiatedClass(ClassEntity cls) {
2722 WorldImpact worldImpact = _processClass(cls, forResolution: false); 2723 WorldImpact worldImpact = _processClass(cls, forResolution: false);
2723 lookupMapAnalysis.registerInstantiatedClass(cls); 2724 lookupMapAnalysis.registerInstantiatedClass(cls);
2724 return worldImpact; 2725 return worldImpact;
2725 } 2726 }
2726 2727
2727 // TODO(johnniwinther): Avoid the need for accessing [_backend]. 2728 // TODO(johnniwinther): Avoid the need for accessing [_backend].
2728 bool methodNeedsRti(FunctionElement function) => 2729 bool methodNeedsRti(FunctionElement function) =>
2729 _backend.methodNeedsRti(function); 2730 _backend.methodNeedsRti(function);
2730 } 2731 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698