| Index: runtime/vm/flow_graph_compiler_x64.cc
|
| diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
|
| index 42b3677bc82c3adf48a372fd084373708321f716..05ac0dedb49799bcdeaec328a280a02f7e9a9b5a 100644
|
| --- a/runtime/vm/flow_graph_compiler_x64.cc
|
| +++ b/runtime/vm/flow_graph_compiler_x64.cc
|
| @@ -1325,17 +1325,29 @@ void FlowGraphCompiler::EmitSwitchableInstanceCall(
|
| __ CallPatchable(*StubCode::ICLookup_entry());
|
| } else {
|
| const String& name = String::Handle(zone(), ic_data.target_name());
|
| - const Array& arguments_descriptor =
|
| - Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
|
| - ASSERT(!arguments_descriptor.IsNull() &&
|
| - (arguments_descriptor.Length() > 0));
|
| - const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(),
|
| - MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor));
|
| -
|
| - __ LoadUniqueObject(RBX, cache);
|
| - __ CallPatchable(*StubCode::MegamorphicLookup_entry());
|
| +
|
| + if (name.raw() == Symbols::Plus().raw()) {
|
| + __ LoadUniqueObject(RBX, ic_data);
|
| + __ CallPatchable(*StubCode::ICSmiAddLookup_entry());
|
| + } else if (name.raw() == Symbols::Minus().raw()) {
|
| + __ LoadUniqueObject(RBX, ic_data);
|
| + __ CallPatchable(*StubCode::ICSmiSubLookup_entry());
|
| + } else if (name.raw() == Symbols::Equals().raw()) {
|
| + __ LoadUniqueObject(RBX, ic_data);
|
| + __ CallPatchable(*StubCode::ICSmiEqualLookup_entry());
|
| + } else {
|
| + const Array& arguments_descriptor =
|
| + Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
|
| + ASSERT(!arguments_descriptor.IsNull() &&
|
| + (arguments_descriptor.Length() > 0));
|
| + const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(),
|
| + MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor));
|
| +
|
| + __ LoadUniqueObject(RBX, cache);
|
| + __ CallPatchable(*StubCode::MegamorphicLookup_entry());
|
| + }
|
| }
|
| - __ call(RCX);
|
| + __ call(RCX); // A fast Smi operation may return past this call.
|
|
|
| AddCurrentDescriptor(RawPcDescriptors::kOther,
|
| Thread::kNoDeoptId, token_pos);
|
|
|