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

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

Issue 6384020: Remove the redundant load on every context lookup. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
Patch Set: Addressed review comments. 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
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | 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 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 } 1678 }
1679 1679
1680 1680
1681 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { 1681 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
1682 LOperand* context = UseRegisterAtStart(instr->value()); 1682 LOperand* context = UseRegisterAtStart(instr->value());
1683 return DefineAsRegister(new LLoadContextSlot(context)); 1683 return DefineAsRegister(new LLoadContextSlot(context));
1684 } 1684 }
1685 1685
1686 1686
1687 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { 1687 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
1688 LOperand* context = UseTempRegister(instr->context()); 1688 LOperand* context;
1689 LOperand* value; 1689 LOperand* value;
1690 LOperand* temp; 1690 LOperand* temp;
1691 if (instr->NeedsWriteBarrier()) { 1691 if (instr->NeedsWriteBarrier()) {
1692 context = UseTempRegister(instr->context());
1692 value = UseTempRegister(instr->value()); 1693 value = UseTempRegister(instr->value());
1693 temp = TempRegister(); 1694 temp = TempRegister();
1694 } else { 1695 } else {
1696 context = UseRegister(instr->context());
1695 value = UseRegister(instr->value()); 1697 value = UseRegister(instr->value());
1696 temp = NULL; 1698 temp = NULL;
1697 } 1699 }
1698 return new LStoreContextSlot(context, value, temp); 1700 return new LStoreContextSlot(context, value, temp);
1699 } 1701 }
1700 1702
1701 1703
1702 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { 1704 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
1703 ASSERT(instr->representation().IsTagged()); 1705 ASSERT(instr->representation().IsTagged());
1704 LOperand* obj = UseRegisterAtStart(instr->object()); 1706 LOperand* obj = UseRegisterAtStart(instr->object());
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1955 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1957 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1956 HEnvironment* outer = current_block_->last_environment()->outer(); 1958 HEnvironment* outer = current_block_->last_environment()->outer();
1957 current_block_->UpdateEnvironment(outer); 1959 current_block_->UpdateEnvironment(outer);
1958 return NULL; 1960 return NULL;
1959 } 1961 }
1960 1962
1961 1963
1962 } } // namespace v8::internal 1964 } } // namespace v8::internal
1963 1965
1964 #endif // V8_TARGET_ARCH_IA32 1966 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698