Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 1f01df62f7c6fe4b3335e72ea40d8b5dd5bd32a6..b618c3798e775a878f21980bd36e152415251c39 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -225,6 +225,13 @@ void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { |
} |
+void LIsStringAndBranch::PrintDataTo(StringStream* stream) { |
+ stream->Add("if is_string("); |
+ InputAt(0)->PrintTo(stream); |
+ stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
+} |
+ |
+ |
void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { |
stream->Add("if is_smi("); |
InputAt(0)->PrintTo(stream); |
@@ -239,6 +246,14 @@ void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) { |
} |
+void LStringCompareAndBranch::PrintDataTo(StringStream* stream) { |
+ stream->Add("if compare_generic("); |
+ InputAt(1)->PrintTo(stream); |
+ InputAt(2)->PrintTo(stream); |
+ stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
+} |
+ |
+ |
void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { |
stream->Add("if has_instance_type("); |
InputAt(0)->PrintTo(stream); |
@@ -1499,6 +1514,13 @@ LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { |
} |
+LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { |
+ ASSERT(instr->value()->representation().IsTagged()); |
+ LOperand* temp = TempRegister(); |
+ return new LIsStringAndBranch(UseRegister(instr->value()), temp); |
+} |
+ |
+ |
LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { |
ASSERT(instr->value()->representation().IsTagged()); |
return new(zone()) LIsSmiAndBranch(Use(instr->value())); |
@@ -1513,6 +1535,21 @@ LInstruction* LChunkBuilder::DoIsUndetectableAndBranch( |
} |
+LInstruction* LChunkBuilder::DoStringCompareAndBranch( |
+ HStringCompareAndBranch* instr) { |
+ ASSERT(instr->left()->representation().IsTagged()); |
+ ASSERT(instr->right()->representation().IsTagged()); |
+ LOperand* context = UseFixed(instr->context(), esi); |
+ LOperand* left = UseFixed(instr->left(), edx); |
+ LOperand* right = UseFixed(instr->right(), eax); |
+ |
+ LStringCompareAndBranch* result = new |
+ LStringCompareAndBranch(context, left, right); |
+ |
+ return MarkAsCall(result, instr); |
+} |
+ |
+ |
LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( |
HHasInstanceTypeAndBranch* instr) { |
ASSERT(instr->value()->representation().IsTagged()); |