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

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

Issue 2828873002: Revert "Remove JavaScriptBackend from ClosedWorldBase" (Closed)
Patch Set: Created 3 years, 8 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 import '../constants/values.dart'; 5 import '../constants/values.dart';
6 import '../elements/elements.dart'; 6 import '../elements/elements.dart';
7 import '../js_backend/js_backend.dart'; 7 import '../js_backend/js_backend.dart';
8 import '../js_backend/interceptor_data.dart'; 8 import '../js_backend/interceptor_data.dart';
9 import '../options.dart'; 9 import '../options.dart';
10 import '../types/types.dart'; 10 import '../types/types.dart';
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // TODO(15933): Make automatically generated property extraction closures 135 // TODO(15933): Make automatically generated property extraction closures
136 // work with the dummy receiver optimization. 136 // work with the dummy receiver optimization.
137 if (selector.isGetter) return; 137 if (selector.isGetter) return;
138 138
139 // This assignment of inputs is uniform for HInvokeDynamic and HInvokeSuper. 139 // This assignment of inputs is uniform for HInvokeDynamic and HInvokeSuper.
140 HInstruction interceptor = node.inputs[0]; 140 HInstruction interceptor = node.inputs[0];
141 HInstruction receiverArgument = node.inputs[1]; 141 HInstruction receiverArgument = node.inputs[1];
142 142
143 if (interceptor.nonCheck() == receiverArgument.nonCheck()) { 143 if (interceptor.nonCheck() == receiverArgument.nonCheck()) {
144 if (_interceptorData.isInterceptedSelector(selector) && 144 if (_interceptorData.isInterceptedSelector(selector) &&
145 !_interceptorData.isInterceptedMixinSelector( 145 !_interceptorData.isInterceptedMixinSelector(selector, mask)) {
146 selector, mask, _closedWorld)) {
147 ConstantValue constant = new SyntheticConstantValue( 146 ConstantValue constant = new SyntheticConstantValue(
148 SyntheticConstantKind.DUMMY_INTERCEPTOR, 147 SyntheticConstantKind.DUMMY_INTERCEPTOR,
149 receiverArgument.instructionType); 148 receiverArgument.instructionType);
150 HConstant dummy = graph.addConstant(constant, _closedWorld); 149 HConstant dummy = graph.addConstant(constant, _closedWorld);
151 receiverArgument.usedBy.remove(node); 150 receiverArgument.usedBy.remove(node);
152 node.inputs[1] = dummy; 151 node.inputs[1] = dummy;
153 dummy.usedBy.add(node); 152 dummy.usedBy.add(node);
154 } 153 }
155 } 154 }
156 } 155 }
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 } 800 }
802 801
803 // If [thenInput] is defined in the first predecessor, then it is only used 802 // If [thenInput] is defined in the first predecessor, then it is only used
804 // by [phi] and can be generated at use site. 803 // by [phi] and can be generated at use site.
805 if (identical(thenInput.block, end.predecessors[0])) { 804 if (identical(thenInput.block, end.predecessors[0])) {
806 assert(thenInput.usedBy.length == 1); 805 assert(thenInput.usedBy.length == 1);
807 markAsGenerateAtUseSite(thenInput); 806 markAsGenerateAtUseSite(thenInput);
808 } 807 }
809 } 808 }
810 } 809 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen.dart ('k') | pkg/compiler/lib/src/ssa/interceptor_simplifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698