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

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

Issue 1438453002: Use Feature directly in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 library dart2js.js_helpers.impact; 5 library dart2js.js_helpers.impact;
6 6
7 import '../common/names.dart' show 7 import '../common/names.dart' show
8 Identifiers; 8 Identifiers;
9 import '../compiler.dart' show 9 import '../compiler.dart' show
10 Compiler; 10 Compiler;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 staticUses: [ 193 staticUses: [
194 helpers.assertTest, 194 helpers.assertTest,
195 helpers.assertThrow]); 195 helpers.assertThrow]);
196 196
197 BackendImpact get asyncForIn => new BackendImpact( 197 BackendImpact get asyncForIn => new BackendImpact(
198 staticUses: [ 198 staticUses: [
199 helpers.streamIteratorConstructor]); 199 helpers.streamIteratorConstructor]);
200 200
201 BackendImpact get stringInterpolation => new BackendImpact( 201 BackendImpact get stringInterpolation => new BackendImpact(
202 staticUses: [ 202 staticUses: [
203 helpers.stringInterpolationHelper]); 203 helpers.stringInterpolationHelper],
204 otherImpacts: [
205 needsString('Strings are created.')]);
206
207 BackendImpact get stringJuxtaposition {
208 return needsString('String.concat is used.');
209 }
210
211 // TODO(johnniwinther): Point to to the JavaScript classes instead of the Dart
212 // classes in these impacts.
213 BackendImpact get nullLiteral => new BackendImpact(
214 instantiatedClasses: [
215 coreClasses.nullClass]);
216
217 BackendImpact get boolLiteral => new BackendImpact(
218 instantiatedClasses: [
219 coreClasses.boolClass]);
220
221 BackendImpact get intLiteral => new BackendImpact(
222 instantiatedClasses: [
223 coreClasses.intClass]);
224
225 BackendImpact get doubleLiteral => new BackendImpact(
226 instantiatedClasses: [
227 coreClasses.doubleClass]);
228
229 BackendImpact get stringLiteral => new BackendImpact(
230 instantiatedClasses: [
231 coreClasses.stringClass]);
204 232
205 BackendImpact get catchStatement => new BackendImpact( 233 BackendImpact get catchStatement => new BackendImpact(
206 staticUses: [ 234 staticUses: [
207 helpers.exceptionUnwrapper], 235 helpers.exceptionUnwrapper],
208 instantiatedClasses: [ 236 instantiatedClasses: [
209 helpers.jsPlainJavaScriptObjectClass, 237 helpers.jsPlainJavaScriptObjectClass,
210 helpers.jsUnknownJavaScriptObjectClass]); 238 helpers.jsUnknownJavaScriptObjectClass]);
211 239
212 BackendImpact get throwExpression => new BackendImpact( 240 BackendImpact get throwExpression => new BackendImpact(
213 // We don't know ahead of time whether we will need the throw in a 241 // We don't know ahead of time whether we will need the throw in a
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 staticUses: [ 326 staticUses: [
299 // We will neeed to add the "$is" and "$as" properties on the 327 // We will neeed to add the "$is" and "$as" properties on the
300 // JavaScript object prototype, so we make sure 328 // JavaScript object prototype, so we make sure
301 // [:defineProperty:] is compiled. 329 // [:defineProperty:] is compiled.
302 helpers.defineProperty]); 330 helpers.defineProperty]);
303 331
304 BackendImpact get closure => new BackendImpact( 332 BackendImpact get closure => new BackendImpact(
305 instantiatedClasses: [ 333 instantiatedClasses: [
306 coreClasses.functionClass]); 334 coreClasses.functionClass]);
307 } 335 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/resolution/class_hierarchy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698