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

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

Issue 1525603002: Associate compile-time errors with elements (Closed) Base URL: git@github.com:dart-lang/sdk.git@_temporary_fletch_patches
Patch Set: Created 5 years 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 part of ssa; 5 part of ssa;
6 6
7 abstract class OptimizationPhase { 7 abstract class OptimizationPhase {
8 String get name; 8 String get name;
9 void visitGraph(HGraph graph); 9 void visitGraph(HGraph graph);
10 } 10 }
(...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after
2001 instruction.getDartReceiver(compiler).nonCheck(); 2001 instruction.getDartReceiver(compiler).nonCheck();
2002 memorySet.registerFieldValueUpdate( 2002 memorySet.registerFieldValueUpdate(
2003 instruction.element, receiver, instruction.inputs.last); 2003 instruction.element, receiver, instruction.inputs.last);
2004 } 2004 }
2005 2005
2006 void visitForeignNew(HForeignNew instruction) { 2006 void visitForeignNew(HForeignNew instruction) {
2007 memorySet.registerAllocation(instruction); 2007 memorySet.registerAllocation(instruction);
2008 if (shouldTrackInitialValues(instruction)) { 2008 if (shouldTrackInitialValues(instruction)) {
2009 int argumentIndex = 0; 2009 int argumentIndex = 0;
2010 instruction.element.forEachInstanceField((_, Element member) { 2010 instruction.element.forEachInstanceField((_, Element member) {
2011 if (compiler.elementHasCompileTimeError(member)) return; 2011 if (compiler.generateCodeWithCompileTimeErrors &&
2012 compiler.elementHasCompileTimeError(member)) return;
2012 memorySet.registerFieldValue( 2013 memorySet.registerFieldValue(
2013 member, instruction, instruction.inputs[argumentIndex++]); 2014 member, instruction, instruction.inputs[argumentIndex++]);
2014 }, includeSuperAndInjectedMembers: true); 2015 }, includeSuperAndInjectedMembers: true);
2015 } 2016 }
2016 // In case this instruction has as input non-escaping objects, we 2017 // In case this instruction has as input non-escaping objects, we
2017 // need to mark these objects as escaping. 2018 // need to mark these objects as escaping.
2018 memorySet.killAffectedBy(instruction); 2019 memorySet.killAffectedBy(instruction);
2019 } 2020 }
2020 2021
2021 bool shouldTrackInitialValues(HForeignNew instruction) { 2022 bool shouldTrackInitialValues(HForeignNew instruction) {
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
2402 2403
2403 keyedValues.forEach((receiver, values) { 2404 keyedValues.forEach((receiver, values) {
2404 result.keyedValues[receiver] = 2405 result.keyedValues[receiver] =
2405 new Map<HInstruction, HInstruction>.from(values); 2406 new Map<HInstruction, HInstruction>.from(values);
2406 }); 2407 });
2407 2408
2408 result.nonEscapingReceivers.addAll(nonEscapingReceivers); 2409 result.nonEscapingReceivers.addAll(nonEscapingReceivers);
2409 return result; 2410 return result;
2410 } 2411 }
2411 } 2412 }
OLDNEW
« pkg/compiler/lib/src/ssa/builder.dart ('K') | « pkg/compiler/lib/src/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698