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

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

Issue 6410120: Refactor lithium instructions for constants.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 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
« src/x64/lithium-x64.h ('K') | « 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 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 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 1545
1546 1546
1547 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { 1547 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
1548 return new LReturn(UseFixed(instr->value(), rax)); 1548 return new LReturn(UseFixed(instr->value(), rax));
1549 } 1549 }
1550 1550
1551 1551
1552 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { 1552 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
1553 Representation r = instr->representation(); 1553 Representation r = instr->representation();
1554 if (r.IsInteger32()) { 1554 if (r.IsInteger32()) {
1555 int32_t value = instr->Integer32Value(); 1555 return DefineAsRegister(new LConstantI);
1556 return DefineAsRegister(new LConstantI(value));
1557 } else if (r.IsDouble()) { 1556 } else if (r.IsDouble()) {
1558 double value = instr->DoubleValue();
1559 LOperand* temp = TempRegister(); 1557 LOperand* temp = TempRegister();
1560 return DefineAsRegister(new LConstantD(value, temp)); 1558 return DefineAsRegister(new LConstantD(temp));
1561 } else if (r.IsTagged()) { 1559 } else if (r.IsTagged()) {
1562 return DefineAsRegister(new LConstantT(instr->handle())); 1560 return DefineAsRegister(new LConstantT);
1563 } else { 1561 } else {
1564 UNREACHABLE(); 1562 UNREACHABLE();
1565 return NULL; 1563 return NULL;
1566 } 1564 }
1567 } 1565 }
1568 1566
1569 1567
1570 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { 1568 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) {
1571 LLoadGlobal* result = new LLoadGlobal; 1569 LLoadGlobal* result = new LLoadGlobal;
1572 return instr->check_hole_value() 1570 return instr->check_hole_value()
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 1812
1815 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1813 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1816 HEnvironment* outer = current_block_->last_environment()->outer(); 1814 HEnvironment* outer = current_block_->last_environment()->outer();
1817 current_block_->UpdateEnvironment(outer); 1815 current_block_->UpdateEnvironment(outer);
1818 return NULL; 1816 return NULL;
1819 } 1817 }
1820 1818
1821 } } // namespace v8::internal 1819 } } // namespace v8::internal
1822 1820
1823 #endif // V8_TARGET_ARCH_X64 1821 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/x64/lithium-x64.h ('K') | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698