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

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

Issue 559313004: VM: Remove unreachable code from the code generator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm64.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 5740 matching lines...) Expand 10 before | Expand all | Expand 10 after
5751 } 5751 }
5752 5752
5753 5753
5754 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary( 5754 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary(
5755 Isolate* isolate, bool opt) const { 5755 Isolate* isolate, bool opt) const {
5756 return MakeCallSummary(); 5756 return MakeCallSummary();
5757 } 5757 }
5758 5758
5759 5759
5760 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5760 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5761 Label* deopt = compiler->AddDeoptStub(
5762 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail);
5763 if (ic_data().NumberOfChecks() == 0) {
5764 __ b(deopt);
5765 return;
5766 }
5767 ASSERT(ic_data().NumArgsTested() == 1); 5761 ASSERT(ic_data().NumArgsTested() == 1);
5768 if (!with_checks()) { 5762 if (!with_checks()) {
5769 ASSERT(ic_data().HasOneTarget()); 5763 ASSERT(ic_data().HasOneTarget());
5770 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); 5764 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0));
5771 compiler->GenerateStaticCall(deopt_id(), 5765 compiler->GenerateStaticCall(deopt_id(),
5772 instance_call()->token_pos(), 5766 instance_call()->token_pos(),
5773 target, 5767 target,
5774 instance_call()->ArgumentCount(), 5768 instance_call()->ArgumentCount(),
5775 instance_call()->argument_names(), 5769 instance_call()->argument_names(),
5776 locs(), 5770 locs(),
5777 ICData::Handle()); 5771 ICData::Handle());
5778 return; 5772 return;
5779 } 5773 }
5780 5774
5781 // Load receiver into R0. 5775 // Load receiver into R0.
5782 __ LoadFromOffset(kWord, R0, SP, 5776 __ LoadFromOffset(kWord, R0, SP,
5783 (instance_call()->ArgumentCount() - 1) * kWordSize); 5777 (instance_call()->ArgumentCount() - 1) * kWordSize);
5784 5778
5779 Label* deopt = compiler->AddDeoptStub(
5780 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail);
5785 LoadValueCid(compiler, R2, R0, 5781 LoadValueCid(compiler, R2, R0,
5786 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); 5782 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt);
5787 5783
5788 compiler->EmitTestAndCall(ic_data(), 5784 compiler->EmitTestAndCall(ic_data(),
5789 R2, // Class id register. 5785 R2, // Class id register.
5790 instance_call()->ArgumentCount(), 5786 instance_call()->ArgumentCount(),
5791 instance_call()->argument_names(), 5787 instance_call()->argument_names(),
5792 deopt, 5788 deopt,
5793 deopt_id(), 5789 deopt_id(),
5794 instance_call()->token_pos(), 5790 instance_call()->token_pos(),
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
7023 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 7019 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
7024 #if defined(DEBUG) 7020 #if defined(DEBUG)
7025 __ LoadImmediate(R4, kInvalidObjectPointer); 7021 __ LoadImmediate(R4, kInvalidObjectPointer);
7026 __ LoadImmediate(R5, kInvalidObjectPointer); 7022 __ LoadImmediate(R5, kInvalidObjectPointer);
7027 #endif 7023 #endif
7028 } 7024 }
7029 7025
7030 } // namespace dart 7026 } // namespace dart
7031 7027
7032 #endif // defined TARGET_ARCH_ARM 7028 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698