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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 744853003: Integrate the Irregexp Regular Expression Engine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix clang and win build Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/flow_graph_range_analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 82fe8947be277db2215c8c5383c34e33f8aa7bd2..2ed1b2958603e9cce977131567cf43af74a9c513 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -4567,6 +4567,15 @@ void FlowGraphOptimizer::VisitAllocateContext(AllocateContextInstr* instr) {
}
+void FlowGraphOptimizer::VisitLoadCodeUnits(LoadCodeUnitsInstr* instr) {
+ // TODO(zerny): Use kUnboxedUint32 once it is fully supported/optimized.
+#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM)
+ if (!instr->can_pack_into_smi())
+ instr->set_representation(kUnboxedMint);
+#endif
+}
+
+
bool FlowGraphOptimizer::TryInlineInstanceSetter(InstanceCallInstr* instr,
const ICData& unary_ic_data) {
ASSERT((unary_ic_data.NumberOfChecks() > 0) &&
@@ -7590,6 +7599,13 @@ void ConstantPropagator::VisitTargetEntry(TargetEntryInstr* block) {
}
+void ConstantPropagator::VisitIndirectEntry(IndirectEntryInstr* block) {
+ for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
+ it.Current()->Accept(this);
+ }
+}
+
+
void ConstantPropagator::VisitCatchBlockEntry(CatchBlockEntryInstr* block) {
const GrowableArray<Definition*>& defs = *block->initial_definitions();
for (intptr_t i = 0; i < defs.length(); ++i) {
@@ -7637,6 +7653,13 @@ void ConstantPropagator::VisitGoto(GotoInstr* instr) {
}
+void ConstantPropagator::VisitIndirectGoto(IndirectGotoInstr* instr) {
+ for (intptr_t i = 0; i < instr->SuccessorCount(); i++) {
+ SetReachable(instr->SuccessorAt(i));
+ }
+}
+
+
void ConstantPropagator::VisitBranch(BranchInstr* instr) {
instr->comparison()->Accept(this);
@@ -8099,6 +8122,12 @@ void ConstantPropagator::VisitLoadIndexed(LoadIndexedInstr* instr) {
}
+void ConstantPropagator::VisitLoadCodeUnits(LoadCodeUnitsInstr* instr) {
+ // TODO(zerny): Implement constant propagation.
+ SetValue(instr, non_constant_);
+}
+
+
void ConstantPropagator::VisitStoreIndexed(StoreIndexedInstr* instr) {
SetValue(instr, instr->value()->definition()->constant_value());
}
@@ -8741,6 +8770,12 @@ void ConstantPropagator::VisitMathMinMax(MathMinMaxInstr* instr) {
}
+void ConstantPropagator::VisitCaseInsensitiveCompareUC16(
+ CaseInsensitiveCompareUC16Instr *instr) {
+ SetValue(instr, non_constant_);
+}
+
+
void ConstantPropagator::VisitUnbox(UnboxInstr* instr) {
const Object& value = instr->value()->definition()->constant_value();
if (IsNonConstant(value)) {
@@ -8823,7 +8858,8 @@ void ConstantPropagator::Analyze() {
static bool IsEmptyBlock(BlockEntryInstr* block) {
return block->next()->IsGoto() &&
- (!block->IsJoinEntry() || (block->AsJoinEntry()->phis() == NULL));
+ (!block->IsJoinEntry() || (block->AsJoinEntry()->phis() == NULL)) &&
+ !block->IsIndirectEntry();
}
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/flow_graph_range_analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698