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

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

Issue 6708085: Enable GVN for polymorphic loads by not expanding them at the HIR level. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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/arm/lithium-codegen-arm.cc ('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 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 } 1756 }
1757 1757
1758 1758
1759 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { 1759 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
1760 ASSERT(instr->representation().IsTagged()); 1760 ASSERT(instr->representation().IsTagged());
1761 LOperand* obj = UseRegisterAtStart(instr->object()); 1761 LOperand* obj = UseRegisterAtStart(instr->object());
1762 return DefineAsRegister(new LLoadNamedField(obj)); 1762 return DefineAsRegister(new LLoadNamedField(obj));
1763 } 1763 }
1764 1764
1765 1765
1766 LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic(
1767 HLoadNamedFieldPolymorphic* instr) {
1768 ASSERT(instr->representation().IsTagged());
1769 if (instr->need_generic()) {
1770 LOperand* obj = UseFixed(instr->object(), rax);
1771 LLoadNamedFieldPolymorphic* result = new LLoadNamedFieldPolymorphic(obj);
1772 return MarkAsCall(DefineFixed(result, rax), instr);
1773 } else {
1774 LOperand* obj = UseRegisterAtStart(instr->object());
1775 LLoadNamedFieldPolymorphic* result = new LLoadNamedFieldPolymorphic(obj);
1776 return AssignEnvironment(DefineAsRegister(result));
1777 }
1778 }
1779
1780
1766 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 1781 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
1767 LOperand* object = UseFixed(instr->object(), rax); 1782 LOperand* object = UseFixed(instr->object(), rax);
1768 LLoadNamedGeneric* result = new LLoadNamedGeneric(object); 1783 LLoadNamedGeneric* result = new LLoadNamedGeneric(object);
1769 return MarkAsCall(DefineFixed(result, rax), instr); 1784 return MarkAsCall(DefineFixed(result, rax), instr);
1770 } 1785 }
1771 1786
1772 1787
1773 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 1788 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
1774 HLoadFunctionPrototype* instr) { 1789 HLoadFunctionPrototype* instr) {
1775 return AssignEnvironment(DefineAsRegister( 1790 return AssignEnvironment(DefineAsRegister(
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 2080
2066 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2081 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2067 HEnvironment* outer = current_block_->last_environment()->outer(); 2082 HEnvironment* outer = current_block_->last_environment()->outer();
2068 current_block_->UpdateEnvironment(outer); 2083 current_block_->UpdateEnvironment(outer);
2069 return NULL; 2084 return NULL;
2070 } 2085 }
2071 2086
2072 } } // namespace v8::internal 2087 } } // namespace v8::internal
2073 2088
2074 #endif // V8_TARGET_ARCH_X64 2089 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/arm/lithium-codegen-arm.cc ('K') | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698