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

Side by Side Diff: src/ia32/lithium-ia32.cc

Issue 14971005: Remove HIsNilAndBranch (it's now unused) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 | « src/ia32/lithium-ia32.h ('k') | src/mips/lithium-codegen-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) { 229 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) {
230 stream->Add("if "); 230 stream->Add("if ");
231 left()->PrintTo(stream); 231 left()->PrintTo(stream);
232 stream->Add(" %s ", Token::String(op())); 232 stream->Add(" %s ", Token::String(op()));
233 right()->PrintTo(stream); 233 right()->PrintTo(stream);
234 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); 234 stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
235 } 235 }
236 236
237 237
238 void LIsNilAndBranch::PrintDataTo(StringStream* stream) {
239 stream->Add("if ");
240 value()->PrintTo(stream);
241 stream->Add(kind() == kStrictEquality ? " === " : " == ");
242 stream->Add(nil() == kNullValue ? "null" : "undefined");
243 stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
244 }
245
246
247 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { 238 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) {
248 stream->Add("if is_object("); 239 stream->Add("if is_object(");
249 value()->PrintTo(stream); 240 value()->PrintTo(stream);
250 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 241 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
251 } 242 }
252 243
253 244
254 void LIsStringAndBranch::PrintDataTo(StringStream* stream) { 245 void LIsStringAndBranch::PrintDataTo(StringStream* stream) {
255 stream->Add("if is_string("); 246 stream->Add("if is_string(");
256 value()->PrintTo(stream); 247 value()->PrintTo(stream);
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 } 1717 }
1727 1718
1728 1719
1729 LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch( 1720 LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch(
1730 HCompareConstantEqAndBranch* instr) { 1721 HCompareConstantEqAndBranch* instr) {
1731 return new(zone()) LCmpConstantEqAndBranch( 1722 return new(zone()) LCmpConstantEqAndBranch(
1732 UseRegisterAtStart(instr->value())); 1723 UseRegisterAtStart(instr->value()));
1733 } 1724 }
1734 1725
1735 1726
1736 LInstruction* LChunkBuilder::DoIsNilAndBranch(HIsNilAndBranch* instr) {
1737 // We only need a temp register for non-strict compare.
1738 LOperand* temp = instr->kind() == kStrictEquality ? NULL : TempRegister();
1739 return new(zone()) LIsNilAndBranch(UseRegisterAtStart(instr->value()), temp);
1740 }
1741
1742
1743 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { 1727 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) {
1744 ASSERT(instr->value()->representation().IsTagged()); 1728 ASSERT(instr->value()->representation().IsTagged());
1745 LOperand* temp = TempRegister(); 1729 LOperand* temp = TempRegister();
1746 return new(zone()) LIsObjectAndBranch(UseRegister(instr->value()), temp); 1730 return new(zone()) LIsObjectAndBranch(UseRegister(instr->value()), temp);
1747 } 1731 }
1748 1732
1749 1733
1750 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { 1734 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) {
1751 ASSERT(instr->value()->representation().IsTagged()); 1735 ASSERT(instr->value()->representation().IsTagged());
1752 LOperand* temp = TempRegister(); 1736 LOperand* temp = TempRegister();
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2769 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2753 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2770 LOperand* object = UseRegister(instr->object()); 2754 LOperand* object = UseRegister(instr->object());
2771 LOperand* index = UseTempRegister(instr->index()); 2755 LOperand* index = UseTempRegister(instr->index());
2772 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2756 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2773 } 2757 }
2774 2758
2775 2759
2776 } } // namespace v8::internal 2760 } } // namespace v8::internal
2777 2761
2778 #endif // V8_TARGET_ARCH_IA32 2762 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698