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

Side by Side Diff: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart

Issue 2680823002: Extract InterceptorData from JavaScriptBackend. (Closed)
Patch Set: Updated cf. comments Created 3 years, 10 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:js_runtime/shared/embedded_names.dart'; 5 import 'package:js_runtime/shared/embedded_names.dart';
6 import 'package:kernel/ast.dart' as ir; 6 import 'package:kernel/ast.dart' as ir;
7 7
8 import '../common.dart'; 8 import '../common.dart';
9 import '../compiler.dart'; 9 import '../compiler.dart';
10 import '../constants/expressions.dart'; 10 import '../constants/expressions.dart';
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 return _backend.constants.getConstantValue(constantExpression); 309 return _backend.constants.getConstantValue(constantExpression);
310 } 310 }
311 311
312 ConstantValue getConstantForType(ir.DartType irType) { 312 ConstantValue getConstantForType(ir.DartType irType) {
313 ResolutionDartType type = getDartType(irType); 313 ResolutionDartType type = getDartType(irType);
314 return _backend.constantSystem.createType(_compiler, type.asRaw()); 314 return _backend.constantSystem.createType(_compiler, type.asRaw());
315 } 315 }
316 316
317 bool isIntercepted(ir.Node node) { 317 bool isIntercepted(ir.Node node) {
318 Selector selector = getSelector(node); 318 Selector selector = getSelector(node);
319 return _backend.isInterceptedSelector(selector); 319 return _backend.interceptorData.isInterceptedSelector(selector);
320 } 320 }
321 321
322 bool isInterceptedSelector(Selector selector) { 322 bool isInterceptedSelector(Selector selector) {
323 return _backend.isInterceptedSelector(selector); 323 return _backend.interceptorData.isInterceptedSelector(selector);
324 } 324 }
325 325
326 // Is the member a lazy initialized static or top-level member? 326 // Is the member a lazy initialized static or top-level member?
327 bool isLazyStatic(ir.Member member) { 327 bool isLazyStatic(ir.Member member) {
328 if (member is ir.Field) { 328 if (member is ir.Field) {
329 FieldElement field = _nodeToElement[member]; 329 FieldElement field = _nodeToElement[member];
330 return field.constant == null; 330 return field.constant == null;
331 } 331 }
332 return false; 332 return false;
333 } 333 }
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 JumpTarget continueTarget = 820 JumpTarget continueTarget =
821 astAdapter.getJumpTarget(switchCase, isContinueTarget: true); 821 astAdapter.getJumpTarget(switchCase, isContinueTarget: true);
822 assert(continueTarget is KernelJumpTarget); 822 assert(continueTarget is KernelJumpTarget);
823 targetIndexMap[continueTarget] = switchIndex; 823 targetIndexMap[continueTarget] = switchIndex;
824 assert(builder.jumpTargets[continueTarget] == null); 824 assert(builder.jumpTargets[continueTarget] == null);
825 builder.jumpTargets[continueTarget] = this; 825 builder.jumpTargets[continueTarget] = this;
826 switchIndex++; 826 switchIndex++;
827 } 827 }
828 } 828 }
829 } 829 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/interceptor_simplifier.dart ('k') | pkg/compiler/lib/src/ssa/locals_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698