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

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

Issue 1313903003: [runtime] Remove the redundant %_IsObject intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michis comment. Created 5 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
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/macros.py » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sstream> 5 #include <sstream>
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/ia32/lithium-codegen-ia32.h" 10 #include "src/ia32/lithium-codegen-ia32.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) { 181 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) {
182 stream->Add("if "); 182 stream->Add("if ");
183 left()->PrintTo(stream); 183 left()->PrintTo(stream);
184 stream->Add(" %s ", Token::String(op())); 184 stream->Add(" %s ", Token::String(op()));
185 right()->PrintTo(stream); 185 right()->PrintTo(stream);
186 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); 186 stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
187 } 187 }
188 188
189 189
190 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) {
191 stream->Add("if is_object(");
192 value()->PrintTo(stream);
193 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
194 }
195
196
197 void LIsStringAndBranch::PrintDataTo(StringStream* stream) { 190 void LIsStringAndBranch::PrintDataTo(StringStream* stream) {
198 stream->Add("if is_string("); 191 stream->Add("if is_string(");
199 value()->PrintTo(stream); 192 value()->PrintTo(stream);
200 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 193 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
201 } 194 }
202 195
203 196
204 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { 197 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) {
205 stream->Add("if is_smi("); 198 stream->Add("if is_smi(");
206 value()->PrintTo(stream); 199 value()->PrintTo(stream);
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 1722
1730 1723
1731 LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( 1724 LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch(
1732 HCompareMinusZeroAndBranch* instr) { 1725 HCompareMinusZeroAndBranch* instr) {
1733 LOperand* value = UseRegister(instr->value()); 1726 LOperand* value = UseRegister(instr->value());
1734 LOperand* scratch = TempRegister(); 1727 LOperand* scratch = TempRegister();
1735 return new(zone()) LCompareMinusZeroAndBranch(value, scratch); 1728 return new(zone()) LCompareMinusZeroAndBranch(value, scratch);
1736 } 1729 }
1737 1730
1738 1731
1739 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) {
1740 DCHECK(instr->value()->representation().IsSmiOrTagged());
1741 LOperand* temp = TempRegister();
1742 return new(zone()) LIsObjectAndBranch(UseRegister(instr->value()), temp);
1743 }
1744
1745
1746 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { 1732 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) {
1747 DCHECK(instr->value()->representation().IsTagged()); 1733 DCHECK(instr->value()->representation().IsTagged());
1748 LOperand* temp = TempRegister(); 1734 LOperand* temp = TempRegister();
1749 return new(zone()) LIsStringAndBranch(UseRegister(instr->value()), temp); 1735 return new(zone()) LIsStringAndBranch(UseRegister(instr->value()), temp);
1750 } 1736 }
1751 1737
1752 1738
1753 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { 1739 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) {
1754 DCHECK(instr->value()->representation().IsTagged()); 1740 DCHECK(instr->value()->representation().IsTagged());
1755 return new(zone()) LIsSmiAndBranch(Use(instr->value())); 1741 return new(zone()) LIsSmiAndBranch(Use(instr->value()));
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
2768 LAllocateBlockContext* result = 2754 LAllocateBlockContext* result =
2769 new(zone()) LAllocateBlockContext(context, function); 2755 new(zone()) LAllocateBlockContext(context, function);
2770 return MarkAsCall(DefineFixed(result, esi), instr); 2756 return MarkAsCall(DefineFixed(result, esi), instr);
2771 } 2757 }
2772 2758
2773 2759
2774 } // namespace internal 2760 } // namespace internal
2775 } // namespace v8 2761 } // namespace v8
2776 2762
2777 #endif // V8_TARGET_ARCH_IA32 2763 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698