| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 205 |
| 206 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) { | 206 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) { |
| 207 stream->Add("if "); | 207 stream->Add("if "); |
| 208 InputAt(0)->PrintTo(stream); | 208 InputAt(0)->PrintTo(stream); |
| 209 stream->Add(" %s ", Token::String(op())); | 209 stream->Add(" %s ", Token::String(op())); |
| 210 InputAt(1)->PrintTo(stream); | 210 InputAt(1)->PrintTo(stream); |
| 211 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); | 211 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); |
| 212 } | 212 } |
| 213 | 213 |
| 214 | 214 |
| 215 void LIsNullAndBranch::PrintDataTo(StringStream* stream) { | 215 void LIsNilAndBranch::PrintDataTo(StringStream* stream) { |
| 216 stream->Add("if "); | 216 stream->Add("if "); |
| 217 InputAt(0)->PrintTo(stream); | 217 InputAt(0)->PrintTo(stream); |
| 218 stream->Add(is_strict() ? " === null" : " == null"); | 218 stream->Add(kind() == kStrictEquality ? " === " : " == "); |
| 219 stream->Add(nil() == kNullValue ? "null" : "undefined"); |
| 219 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); | 220 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); |
| 220 } | 221 } |
| 221 | 222 |
| 222 | 223 |
| 223 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { | 224 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { |
| 224 stream->Add("if is_object("); | 225 stream->Add("if is_object("); |
| 225 InputAt(0)->PrintTo(stream); | 226 InputAt(0)->PrintTo(stream); |
| 226 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 227 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
| 227 } | 228 } |
| 228 | 229 |
| (...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1437 return new LCmpObjectEqAndBranch(left, right); | 1438 return new LCmpObjectEqAndBranch(left, right); |
| 1438 } | 1439 } |
| 1439 | 1440 |
| 1440 | 1441 |
| 1441 LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch( | 1442 LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch( |
| 1442 HCompareConstantEqAndBranch* instr) { | 1443 HCompareConstantEqAndBranch* instr) { |
| 1443 return new LCmpConstantEqAndBranch(UseRegisterAtStart(instr->value())); | 1444 return new LCmpConstantEqAndBranch(UseRegisterAtStart(instr->value())); |
| 1444 } | 1445 } |
| 1445 | 1446 |
| 1446 | 1447 |
| 1447 LInstruction* LChunkBuilder::DoIsNullAndBranch(HIsNullAndBranch* instr) { | 1448 LInstruction* LChunkBuilder::DoIsNilAndBranch(HIsNilAndBranch* instr) { |
| 1448 ASSERT(instr->value()->representation().IsTagged()); | 1449 ASSERT(instr->value()->representation().IsTagged()); |
| 1449 return new LIsNullAndBranch(UseRegisterAtStart(instr->value())); | 1450 return new LIsNilAndBranch(UseRegisterAtStart(instr->value())); |
| 1450 } | 1451 } |
| 1451 | 1452 |
| 1452 | 1453 |
| 1453 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { | 1454 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { |
| 1454 ASSERT(instr->value()->representation().IsTagged()); | 1455 ASSERT(instr->value()->representation().IsTagged()); |
| 1455 LOperand* temp = TempRegister(); | 1456 LOperand* temp = TempRegister(); |
| 1456 return new LIsObjectAndBranch(UseRegisterAtStart(instr->value()), temp); | 1457 return new LIsObjectAndBranch(UseRegisterAtStart(instr->value()), temp); |
| 1457 } | 1458 } |
| 1458 | 1459 |
| 1459 | 1460 |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2182 | 2183 |
| 2183 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2184 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
| 2184 LOperand* key = UseRegisterAtStart(instr->key()); | 2185 LOperand* key = UseRegisterAtStart(instr->key()); |
| 2185 LOperand* object = UseRegisterAtStart(instr->object()); | 2186 LOperand* object = UseRegisterAtStart(instr->object()); |
| 2186 LIn* result = new LIn(key, object); | 2187 LIn* result = new LIn(key, object); |
| 2187 return MarkAsCall(DefineFixed(result, r0), instr); | 2188 return MarkAsCall(DefineFixed(result, r0), instr); |
| 2188 } | 2189 } |
| 2189 | 2190 |
| 2190 | 2191 |
| 2191 } } // namespace v8::internal | 2192 } } // namespace v8::internal |
| OLD | NEW |