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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 10541135: Some cleanups, started implementing checked instance calls, better equality operation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 8617)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -56,6 +56,15 @@
}
+void Computation::ReplaceWith(Computation* other) {
+ ASSERT(other->instr() == NULL);
+ ASSERT(instr() != NULL);
+ other->set_instr(other->instr());
+ instr()->replace_computation(other);
+ set_instr(NULL);
+}
+
+
intptr_t InstanceCallComp::InputCount() const {
return ArgumentCount();
}
@@ -467,6 +476,11 @@
}
+RawAbstractType* PolymorphicInstanceCallComp::StaticType() const {
+ return Type::DynamicType();
+}
+
+
RawAbstractType* StaticCallComp::StaticType() const {
return function().result_type();
}
@@ -979,6 +993,29 @@
}
+LocationSummary* PolymorphicInstanceCallComp::MakeLocationSummary() const {
+ return MakeCallSummary();
+}
+
+
+void PolymorphicInstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
+ // TODO(srdjan): Add checked calls, a series of checks each issuing
+ // a direct call to the target if check succeeds.
+ ASSERT(VerifyCallComputation(instance_call()));
+ compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
+ instance_call()->cid(),
+ instance_call()->token_index(),
+ instance_call()->try_index());
+ compiler->GenerateInstanceCall(instance_call()->cid(),
+ instance_call()->token_index(),
+ instance_call()->try_index(),
+ instance_call()->function_name(),
+ instance_call()->ArgumentCount(),
+ instance_call()->argument_names(),
+ instance_call()->checked_argument_count());
+}
+
+
LocationSummary* StaticCallComp::MakeLocationSummary() const {
return MakeCallSummary();
}
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698