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

Side by Side Diff: runtime/vm/intermediate_language_mips.cc

Issue 1184093004: Faster checks in polymorphic instance calls if Smi-s are involved (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: m Created 5 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 4584 matching lines...) Expand 10 before | Expand all | Expand 10 after
4595 compiler->GenerateStaticCall(deopt_id(), 4595 compiler->GenerateStaticCall(deopt_id(),
4596 instance_call()->token_pos(), 4596 instance_call()->token_pos(),
4597 target, 4597 target,
4598 instance_call()->ArgumentCount(), 4598 instance_call()->ArgumentCount(),
4599 instance_call()->argument_names(), 4599 instance_call()->argument_names(),
4600 locs(), 4600 locs(),
4601 ICData::Handle()); 4601 ICData::Handle());
4602 return; 4602 return;
4603 } 4603 }
4604 4604
4605 // Load receiver into T0.
4606 __ LoadFromOffset(T0, SP, (instance_call()->ArgumentCount() - 1) * kWordSize);
4607 4605
4608 Label* deopt = compiler->AddDeoptStub( 4606 Label* deopt = compiler->AddDeoptStub(
4609 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); 4607 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail);
4610 LoadValueCid(compiler, T2, T0, 4608 Label ok;
4611 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt);
4612
4613 compiler->EmitTestAndCall(ic_data(), 4609 compiler->EmitTestAndCall(ic_data(),
4614 T2, // Class id register.
4615 instance_call()->ArgumentCount(), 4610 instance_call()->ArgumentCount(),
4616 instance_call()->argument_names(), 4611 instance_call()->argument_names(),
4617 deopt, 4612 deopt,
4613 &ok,
4618 deopt_id(), 4614 deopt_id(),
4619 instance_call()->token_pos(), 4615 instance_call()->token_pos(),
4620 locs()); 4616 locs());
4617 __ Bind(&ok);
4621 } 4618 }
4622 4619
4623 4620
4624 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, 4621 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone,
4625 bool opt) const { 4622 bool opt) const {
4626 comparison()->InitializeLocationSummary(zone, opt); 4623 comparison()->InitializeLocationSummary(zone, opt);
4627 // Branches don't produce a result. 4624 // Branches don't produce a result.
4628 comparison()->locs()->set_out(0, Location::NoLocation()); 4625 comparison()->locs()->set_out(0, Location::NoLocation());
4629 return comparison()->locs(); 4626 return comparison()->locs();
4630 } 4627 }
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
5626 1, 5623 1,
5627 locs()); 5624 locs());
5628 __ lw(result, Address(SP, 1 * kWordSize)); 5625 __ lw(result, Address(SP, 1 * kWordSize));
5629 __ addiu(SP, SP, Immediate(2 * kWordSize)); 5626 __ addiu(SP, SP, Immediate(2 * kWordSize));
5630 } 5627 }
5631 5628
5632 5629
5633 } // namespace dart 5630 } // namespace dart
5634 5631
5635 #endif // defined TARGET_ARCH_MIPS 5632 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698