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

Side by Side Diff: src/ia32/lithium-ia32.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
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 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 } 1783 }
1784 1784
1785 1785
1786 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { 1786 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
1787 ASSERT(instr->representation().IsTagged()); 1787 ASSERT(instr->representation().IsTagged());
1788 LOperand* obj = UseRegisterAtStart(instr->object()); 1788 LOperand* obj = UseRegisterAtStart(instr->object());
1789 return DefineAsRegister(new LLoadNamedField(obj)); 1789 return DefineAsRegister(new LLoadNamedField(obj));
1790 } 1790 }
1791 1791
1792 1792
1793 LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic(
1794 HLoadNamedFieldPolymorphic* instr) {
1795 ASSERT(instr->representation().IsTagged());
1796 if (instr->need_generic()) {
1797 LOperand* obj = UseFixed(instr->object(), eax);
1798 LLoadNamedFieldPolymorphic* result = new LLoadNamedFieldPolymorphic(obj);
1799 return MarkAsCall(DefineFixed(result, eax), instr);
1800 } else {
1801 LOperand* obj = UseRegisterAtStart(instr->object());
1802 LLoadNamedFieldPolymorphic* result = new LLoadNamedFieldPolymorphic(obj);
1803 return AssignEnvironment(DefineAsRegister(result));
1804 }
1805 }
1806
1807
1793 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 1808 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
1794 LOperand* context = UseFixed(instr->context(), esi); 1809 LOperand* context = UseFixed(instr->context(), esi);
1795 LOperand* object = UseFixed(instr->object(), eax); 1810 LOperand* object = UseFixed(instr->object(), eax);
1796 LLoadNamedGeneric* result = new LLoadNamedGeneric(context, object); 1811 LLoadNamedGeneric* result = new LLoadNamedGeneric(context, object);
1797 return MarkAsCall(DefineFixed(result, eax), instr); 1812 return MarkAsCall(DefineFixed(result, eax), instr);
1798 } 1813 }
1799 1814
1800 1815
1801 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 1816 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
1802 HLoadFunctionPrototype* instr) { 1817 HLoadFunctionPrototype* instr) {
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2122 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2108 HEnvironment* outer = current_block_->last_environment()->outer(); 2123 HEnvironment* outer = current_block_->last_environment()->outer();
2109 current_block_->UpdateEnvironment(outer); 2124 current_block_->UpdateEnvironment(outer);
2110 return NULL; 2125 return NULL;
2111 } 2126 }
2112 2127
2113 2128
2114 } } // namespace v8::internal 2129 } } // namespace v8::internal
2115 2130
2116 #endif // V8_TARGET_ARCH_IA32 2131 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698