Chromium Code Reviews| Index: src/ia32/lithium-ia32.cc |
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
| index 626f899bfbb04b029cb3c5005d52ab82c4f63183..e21af3050d122061c7072d7d67fc562e7e168347 100644 |
| --- a/src/ia32/lithium-ia32.cc |
| +++ b/src/ia32/lithium-ia32.cc |
| @@ -230,6 +230,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); |
| @@ -244,6 +251,14 @@ void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) { |
| } |
| +void LCompareGenericAndBranch::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); |
| @@ -1446,7 +1461,7 @@ LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
| LOperand* left = UseFixed(instr->left(), edx); |
| LOperand* right = UseFixed(instr->right(), eax); |
| LCmpT* result = new LCmpT(context, left, right); |
| - return MarkAsCall(DefineFixed(result, eax), instr); |
| + return AssignEnvironment(MarkAsCall(DefineFixed(result, eax), instr)); |
|
fschneider
2011/11/01 09:26:19
MarkAsCall should already assign environments if n
indutny
2011/11/01 09:31:07
It was segfaulting w/o that
|
| } |
| @@ -1505,6 +1520,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 LIsSmiAndBranch(Use(instr->value())); |
| @@ -1519,6 +1541,21 @@ LInstruction* LChunkBuilder::DoIsUndetectableAndBranch( |
| } |
| +LInstruction* LChunkBuilder::DoCompareGenericAndBranch( |
| + HCompareGenericAndBranch* 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); |
| + |
| + LCompareGenericAndBranch* result = new |
| + LCompareGenericAndBranch(context, left, right); |
| + |
| + return AssignEnvironment(MarkAsCall(result, instr)); |
| +} |
| + |
| + |
| LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( |
| HHasInstanceTypeAndBranch* instr) { |
| ASSERT(instr->value()->representation().IsTagged()); |