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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-x64.h ('k') | no next file » | 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) { 213 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) {
214 stream->Add("if "); 214 stream->Add("if ");
215 left()->PrintTo(stream); 215 left()->PrintTo(stream);
216 stream->Add(" %s ", Token::String(op())); 216 stream->Add(" %s ", Token::String(op()));
217 right()->PrintTo(stream); 217 right()->PrintTo(stream);
218 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); 218 stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
219 } 219 }
220 220
221 221
222 void LIsNilAndBranch::PrintDataTo(StringStream* stream) {
223 stream->Add("if ");
224 value()->PrintTo(stream);
225 stream->Add(kind() == kStrictEquality ? " === " : " == ");
226 stream->Add(nil() == kNullValue ? "null" : "undefined");
227 stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
228 }
229
230
231 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { 222 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) {
232 stream->Add("if is_object("); 223 stream->Add("if is_object(");
233 value()->PrintTo(stream); 224 value()->PrintTo(stream);
234 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 225 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
235 } 226 }
236 227
237 228
238 void LIsStringAndBranch::PrintDataTo(StringStream* stream) { 229 void LIsStringAndBranch::PrintDataTo(StringStream* stream) {
239 stream->Add("if is_string("); 230 stream->Add("if is_string(");
240 value()->PrintTo(stream); 231 value()->PrintTo(stream);
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 } 1625 }
1635 1626
1636 1627
1637 LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch( 1628 LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch(
1638 HCompareConstantEqAndBranch* instr) { 1629 HCompareConstantEqAndBranch* instr) {
1639 LOperand* value = UseRegisterAtStart(instr->value()); 1630 LOperand* value = UseRegisterAtStart(instr->value());
1640 return new(zone()) LCmpConstantEqAndBranch(value); 1631 return new(zone()) LCmpConstantEqAndBranch(value);
1641 } 1632 }
1642 1633
1643 1634
1644 LInstruction* LChunkBuilder::DoIsNilAndBranch(HIsNilAndBranch* instr) {
1645 ASSERT(instr->value()->representation().IsTagged());
1646 LOperand* temp = instr->kind() == kStrictEquality ? NULL : TempRegister();
1647 return new(zone()) LIsNilAndBranch(UseRegisterAtStart(instr->value()), temp);
1648 }
1649
1650
1651 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { 1635 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) {
1652 ASSERT(instr->value()->representation().IsTagged()); 1636 ASSERT(instr->value()->representation().IsTagged());
1653 return new(zone()) LIsObjectAndBranch(UseRegisterAtStart(instr->value())); 1637 return new(zone()) LIsObjectAndBranch(UseRegisterAtStart(instr->value()));
1654 } 1638 }
1655 1639
1656 1640
1657 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { 1641 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) {
1658 ASSERT(instr->value()->representation().IsTagged()); 1642 ASSERT(instr->value()->representation().IsTagged());
1659 LOperand* value = UseRegisterAtStart(instr->value()); 1643 LOperand* value = UseRegisterAtStart(instr->value());
1660 LOperand* temp = TempRegister(); 1644 LOperand* temp = TempRegister();
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2544 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2561 LOperand* object = UseRegister(instr->object()); 2545 LOperand* object = UseRegister(instr->object());
2562 LOperand* index = UseTempRegister(instr->index()); 2546 LOperand* index = UseTempRegister(instr->index());
2563 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2547 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2564 } 2548 }
2565 2549
2566 2550
2567 } } // namespace v8::internal 2551 } } // namespace v8::internal
2568 2552
2569 #endif // V8_TARGET_ARCH_X64 2553 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698