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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/bounds_checker.dart

Issue 1761903002: dart2js cps: Keep interceptors in a separate field. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase Created 4 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) 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.cps_ir.bounds_checker; 5 library dart2js.cps_ir.bounds_checker;
6 6
7 import 'cps_ir_nodes.dart'; 7 import 'cps_ir_nodes.dart';
8 import 'optimizers.dart' show Pass; 8 import 'optimizers.dart' show Pass;
9 import 'octagon.dart'; 9 import 'octagon.dart';
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 return node.body; 625 return node.body;
626 } 626 }
627 627
628 @override 628 @override
629 void visitInvokeMethod(InvokeMethod node) { 629 void visitInvokeMethod(InvokeMethod node) {
630 if (node.selector.isGetter && node.selector.name == 'length') { 630 if (node.selector.isGetter && node.selector.name == 'length') {
631 // If the receiver type is not known to be indexable, the length call 631 // If the receiver type is not known to be indexable, the length call
632 // was not rewritten to GetLength. But if we can prove that the call only 632 // was not rewritten to GetLength. But if we can prove that the call only
633 // succeeds for indexables, we can trust that it returns the length. 633 // succeeds for indexables, we can trust that it returns the length.
634 TypeMask successType = 634 TypeMask successType =
635 types.receiverTypeFor(node.selector, node.dartReceiver.type); 635 types.receiverTypeFor(node.selector, node.receiver.type);
636 if (types.isDefinitelyIndexable(successType)) { 636 if (types.isDefinitelyIndexable(successType)) {
637 valueOf[node] = getLength(node.dartReceiver, currentEffectNumber); 637 valueOf[node] = getLength(node.receiver, currentEffectNumber);
638 } 638 }
639 } 639 }
640 } 640 }
641 641
642 @override 642 @override
643 void visitApplyBuiltinMethod(ApplyBuiltinMethod node) { 643 void visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
644 Primitive receiver = node.receiver; 644 Primitive receiver = node.receiver;
645 int effectBefore = currentEffectNumber; 645 int effectBefore = currentEffectNumber;
646 currentEffectNumber = makeNewEffect(); 646 currentEffectNumber = makeNewEffect();
647 int effectAfter = currentEffectNumber; 647 int effectAfter = currentEffectNumber;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 699 }
700 return node.body; 700 return node.body;
701 } 701 }
702 } 702 }
703 703
704 /// Lattice representing the known (weak) monotonicity of a loop variable. 704 /// Lattice representing the known (weak) monotonicity of a loop variable.
705 /// 705 ///
706 /// The lattice bottom is represented by `null` and represents the case where 706 /// The lattice bottom is represented by `null` and represents the case where
707 /// the loop variable never changes value during the loop. 707 /// the loop variable never changes value during the loop.
708 enum Monotonicity { NotMonotone, Increasing, Decreasing, } 708 enum Monotonicity { NotMonotone, Increasing, Decreasing, }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/backward_null_check_remover.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_fragment.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698