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

Unified Diff: runtime/vm/flow_graph.cc

Issue 290993003: VM: Remove unnecessary field use_kind from IL instructions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/flow_graph.cc
===================================================================
--- runtime/vm/flow_graph.cc (revision 36349)
+++ runtime/vm/flow_graph.cc (working copy)
@@ -104,7 +104,7 @@
void FlowGraph::InsertBefore(Instruction* next,
Instruction* instr,
Environment* env,
- Definition::UseKind use_kind) {
+ UseKind use_kind) {
InsertAfter(next->previous(), instr, env, use_kind);
}
@@ -112,8 +112,8 @@
void FlowGraph::InsertAfter(Instruction* prev,
Instruction* instr,
Environment* env,
- Definition::UseKind use_kind) {
- if (use_kind == Definition::kValue) {
+ UseKind use_kind) {
+ if (use_kind == kValue) {
ASSERT(instr->IsDefinition());
AllocateSSAIndexes(instr->AsDefinition());
}
@@ -126,8 +126,8 @@
Instruction* FlowGraph::AppendTo(Instruction* prev,
Instruction* instr,
Environment* env,
- Definition::UseKind use_kind) {
- if (use_kind == Definition::kValue) {
+ UseKind use_kind) {
+ if (use_kind == kValue) {
ASSERT(instr->IsDefinition());
AllocateSSAIndexes(instr->AsDefinition());
}
@@ -892,7 +892,7 @@
} else if (load != NULL) {
// The graph construction ensures we do not have an unused LoadLocal
// computation.
- ASSERT(definition->is_used());
+ ASSERT(definition->HasTemp());
intptr_t index = load->local().BitIndexIn(num_non_copied_params_);
result = (*env)[index];
@@ -918,13 +918,13 @@
if (drop->value() != NULL) {
result = drop->value()->definition();
}
- ASSERT((drop->value() != NULL) || !drop->is_used());
+ ASSERT((drop->value() != NULL) || !drop->HasTemp());
} else {
- ASSERT(definition->is_used());
+ ASSERT(definition->HasTemp());
result = GetConstant(constant->value());
}
// Update expression stack or remove from graph.
- if (definition->is_used()) {
+ if (definition->HasTemp()) {
ASSERT(result != NULL);
env->Add(result);
// We remove load/store/constant instructions when we find their
@@ -934,7 +934,7 @@
}
} else {
// Not a load, store, or constant.
- if (definition->is_used()) {
+ if (definition->HasTemp()) {
// Assign fresh SSA temporary and update expression stack.
AllocateSSAIndexes(definition);
env->Add(definition);

Powered by Google App Engine
This is Rietveld 408576698