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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 14740005: Initial support for polymorphic inlining. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 7 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
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index bb5720977e8c5b79a29224ec5ae37aed2cb2fca1..7911dfc09b31c6bece95fe613c81d0245bbb8dbb 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -499,12 +499,16 @@ void Value::RemoveFromUseList() {
}
+// True if the definition has a single input use and is used only in
+// environments at the same instruction as that input use.
bool Definition::HasOnlyUse(Value* use) const {
- return (input_use_list() == use) &&
- (use->next_use() == NULL) &&
- ((env_use_list() == NULL) ||
- ((env_use_list()->instruction() == use->instruction()) &&
- (env_use_list()->next_use() == NULL)));
+ if ((input_use_list() != use) || (use->next_use() != NULL)) return false;
+
+ Instruction* target = use->instruction();
+ for (Value::Iterator it(env_use_list()); !it.Done(); it.Advance()) {
+ if (it.Current()->instruction() != target) return false;
+ }
+ return true;
}
@@ -1494,6 +1498,17 @@ void PhiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
+LocationSummary* RedefinitionInstr::MakeLocationSummary() const {
+ UNREACHABLE();
+ return NULL;
+}
+
+
+void RedefinitionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ UNREACHABLE();
+}
+
+
LocationSummary* ParameterInstr::MakeLocationSummary() const {
UNREACHABLE();
return NULL;
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698