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

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

Issue 2647613004: Use entities in code_emitter_task (Closed)
Patch Set: Updated cf. comments Created 3 years, 11 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 | pkg/compiler/lib/src/js_backend/backend_helpers.dart » ('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) 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 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after
2192 jsAst.Expression dispatchProperty = 2192 jsAst.Expression dispatchProperty =
2193 emitter.generateEmbeddedGlobalAccess(dispatchPropertyName); 2193 emitter.generateEmbeddedGlobalAccess(dispatchPropertyName);
2194 2194
2195 // We pass the dispatch property record to the isJsIndexable 2195 // We pass the dispatch property record to the isJsIndexable
2196 // helper rather than reading it inside the helper to increase the 2196 // helper rather than reading it inside the helper to increase the
2197 // chance of making the dispatch record access monomorphic. 2197 // chance of making the dispatch record access monomorphic.
2198 jsAst.PropertyAccess record = 2198 jsAst.PropertyAccess record =
2199 new jsAst.PropertyAccess(use2, dispatchProperty); 2199 new jsAst.PropertyAccess(use2, dispatchProperty);
2200 2200
2201 List<jsAst.Expression> arguments = <jsAst.Expression>[use1, record]; 2201 List<jsAst.Expression> arguments = <jsAst.Expression>[use1, record];
2202 FunctionElement helper = helpers.isJsIndexable; 2202 MethodElement helper = helpers.isJsIndexable;
2203 jsAst.Expression helperExpression = emitter.staticFunctionAccess(helper); 2203 jsAst.Expression helperExpression = emitter.staticFunctionAccess(helper);
2204 return new jsAst.Call(helperExpression, arguments); 2204 return new jsAst.Call(helperExpression, arguments);
2205 } 2205 }
2206 2206
2207 /// Returns all static fields that are referenced through [targetsUsed]. 2207 /// Returns all static fields that are referenced through [targetsUsed].
2208 /// If the target is a library or class all nested static fields are 2208 /// If the target is a library or class all nested static fields are
2209 /// included too. 2209 /// included too.
2210 Iterable<Element> _findStaticFieldTargets() { 2210 Iterable<Element> _findStaticFieldTargets() {
2211 List staticFields = []; 2211 List staticFields = [];
2212 2212
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
3286 @override 3286 @override
3287 bool isNativeClass(ClassElement element) { 3287 bool isNativeClass(ClassElement element) {
3288 return helpers.backend.isNative(element); 3288 return helpers.backend.isNative(element);
3289 } 3289 }
3290 3290
3291 @override 3291 @override
3292 bool isNativeMember(MemberElement element) { 3292 bool isNativeMember(MemberElement element) {
3293 return helpers.backend.isNative(element); 3293 return helpers.backend.isNative(element);
3294 } 3294 }
3295 } 3295 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698