Chromium Code Reviews| Index: runtime/vm/intermediate_language.cc |
| =================================================================== |
| --- runtime/vm/intermediate_language.cc (revision 8588) |
| +++ 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()); |
|
Vyacheslav Egorov (Google)
2012/06/13 09:02:27
we definitely need to eradicate bind/do. the fact
srdjan
2012/06/13 18:34:24
Yes, agreed.
|
| + instr()->replace_computation(other); |
| + set_instr(NULL); |
| +} |
| + |
| + |
| intptr_t InstanceCallComp::InputCount() const { |
| return ArgumentCount(); |
| } |
| @@ -383,6 +392,11 @@ |
| } |
| +RawAbstractType* CheckedInstanceCallComp::StaticType() const { |
| + return Type::DynamicType(); |
| +} |
| + |
| + |
| RawAbstractType* StaticCallComp::StaticType() const { |
| return function().result_type(); |
| } |
| @@ -854,6 +868,29 @@ |
| } |
| +LocationSummary* CheckedInstanceCallComp::MakeLocationSummary() const { |
| + return MakeCallSummary(); |
| +} |
| + |
| + |
| +void CheckedInstanceCallComp::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(); |
| } |