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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 10938011: Delete code for the now unused IL instruction NumberNegate. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 12438)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -1990,64 +1990,6 @@
}
-LocationSummary* NumberNegateInstr::MakeLocationSummary() const {
- const intptr_t kNumInputs = 1;
- const intptr_t kNumTemps = 1; // Needed for doubles.
- LocationSummary* summary =
- new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
- summary->set_in(0, Location::RegisterLocation(EAX));
- summary->set_temp(0, Location::RegisterLocation(ECX));
- summary->set_out(Location::RegisterLocation(EAX));
- return summary;
-}
-
-
-void NumberNegateInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- const ICData& ic_data = *instance_call()->ic_data();
- ASSERT(!ic_data.IsNull());
- ASSERT(ic_data.num_args_tested() == 1);
-
- // TODO(srdjan): Implement for more checks.
- ASSERT(ic_data.NumberOfChecks() == 1);
- intptr_t test_class_id;
- Function& target = Function::Handle();
- ic_data.GetOneClassCheckAt(0, &test_class_id, &target);
-
- Register value = locs()->in(0).reg();
- Register result = locs()->out().reg();
- ASSERT(value == result);
- Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
- kDeoptUnaryOp);
- if (test_class_id == kDoubleCid) {
- Register temp = locs()->temp(0).reg();
- __ testl(value, Immediate(kSmiTagMask));
- __ j(ZERO, deopt); // Smi.
- __ CompareClassId(value, kDoubleCid, temp);
- __ j(NOT_EQUAL, deopt);
- // Allocate result object.
- const Class& double_class = compiler->double_class();
- const Code& stub =
- Code::Handle(StubCode::GetAllocationStubForClass(double_class));
- const ExternalLabel label(double_class.ToCString(), stub.EntryPoint());
- __ pushl(value);
- compiler->GenerateCall(instance_call()->token_pos(),
- &label,
- PcDescriptors::kOther,
- locs());
- // Result is in EAX.
- ASSERT(result != temp);
- __ movl(result, EAX);
- __ popl(temp);
- __ movsd(XMM0, FieldAddress(temp, Double::value_offset()));
- __ DoubleNegate(XMM0);
- __ movsd(FieldAddress(result, Double::value_offset()), XMM0);
- } else {
- UNREACHABLE();
- }
- ASSERT(ResultCid() == kDoubleCid);
-}
-
-
LocationSummary* DoubleToDoubleInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 1;
const intptr_t kNumTemps = 1;
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698