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

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

Issue 1803303002: Move all flags to CompilerOptions (first step to stop passing the compiler to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; 5 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
6 import '../compiler.dart' show Compiler; 6 import '../compiler.dart' show Compiler;
7 import '../constants/constant_system.dart'; 7 import '../constants/constant_system.dart';
8 import '../constants/values.dart'; 8 import '../constants/values.dart';
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../js_backend/backend_helpers.dart' show BackendHelpers; 10 import '../js_backend/backend_helpers.dart' show BackendHelpers;
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 compiler); 317 compiler);
318 node.conditionalConstantInterceptor = constantInstruction; 318 node.conditionalConstantInterceptor = constantInstruction;
319 constantInstruction.usedBy.add(node); 319 constantInstruction.usedBy.add(node);
320 return false; 320 return false;
321 } 321 }
322 } 322 }
323 } 323 }
324 } 324 }
325 325
326 // Try creating a one-shot interceptor or optimized is-check 326 // Try creating a one-shot interceptor or optimized is-check
327 if (compiler.hasIncrementalSupport) return false; 327 if (compiler.options.hasIncrementalSupport) return false;
328 if (node.usedBy.length != 1) return false; 328 if (node.usedBy.length != 1) return false;
329 HInstruction user = node.usedBy.single; 329 HInstruction user = node.usedBy.single;
330 330
331 // If the interceptor [node] was loop hoisted, we keep the interceptor. 331 // If the interceptor [node] was loop hoisted, we keep the interceptor.
332 if (!user.hasSameLoopHeaderAs(node)) return false; 332 if (!user.hasSameLoopHeaderAs(node)) return false;
333 333
334 bool replaceUserWith(HInstruction replacement) { 334 bool replaceUserWith(HInstruction replacement) {
335 HBasicBlock block = user.block; 335 HBasicBlock block = user.block;
336 block.addAfter(user, replacement); 336 block.addAfter(user, replacement);
337 block.rewrite(user, replacement); 337 block.rewrite(user, replacement);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 instruction = new HInvokeDynamicMethod( 414 instruction = new HInvokeDynamicMethod(
415 selector, mask, inputs, node.instructionType, true); 415 selector, mask, inputs, node.instructionType, true);
416 } 416 }
417 417
418 HBasicBlock block = node.block; 418 HBasicBlock block = node.block;
419 block.addAfter(node, instruction); 419 block.addAfter(node, instruction);
420 block.rewrite(node, instruction); 420 block.rewrite(node, instruction);
421 return true; 421 return true;
422 } 422 }
423 } 423 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen_helpers.dart ('k') | pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698