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

Side by Side Diff: src/arm/lithium-arm.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
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 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 1635
1636 1636
1637 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { 1637 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
1638 return new LReturn(UseFixed(instr->value(), r0)); 1638 return new LReturn(UseFixed(instr->value(), r0));
1639 } 1639 }
1640 1640
1641 1641
1642 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { 1642 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
1643 Representation r = instr->representation(); 1643 Representation r = instr->representation();
1644 if (r.IsInteger32()) { 1644 if (r.IsInteger32()) {
1645 int32_t value = instr->Integer32Value(); 1645 return DefineAsRegister(new LConstantI);
1646 return DefineAsRegister(new LConstantI(value));
1647 } else if (r.IsDouble()) { 1646 } else if (r.IsDouble()) {
1648 double value = instr->DoubleValue(); 1647 return DefineAsRegister(new LConstantD);
1649 return DefineAsRegister(new LConstantD(value));
1650 } else if (r.IsTagged()) { 1648 } else if (r.IsTagged()) {
1651 return DefineAsRegister(new LConstantT(instr->handle())); 1649 return DefineAsRegister(new LConstantT);
1652 } else { 1650 } else {
1653 UNREACHABLE(); 1651 UNREACHABLE();
1654 return NULL; 1652 return NULL;
1655 } 1653 }
1656 } 1654 }
1657 1655
1658 1656
1659 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { 1657 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) {
1660 LLoadGlobal* result = new LLoadGlobal(); 1658 LLoadGlobal* result = new LLoadGlobal();
1661 return instr->check_hole_value() 1659 return instr->check_hole_value()
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 1940
1943 1941
1944 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1942 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1945 HEnvironment* outer = current_block_->last_environment()->outer(); 1943 HEnvironment* outer = current_block_->last_environment()->outer();
1946 current_block_->UpdateEnvironment(outer); 1944 current_block_->UpdateEnvironment(outer);
1947 return NULL; 1945 return NULL;
1948 } 1946 }
1949 1947
1950 1948
1951 } } // namespace v8::internal 1949 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/ia32/lithium-ia32.h » ('j') | src/x64/lithium-x64.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698