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

Side by Side Diff: src/ia32/lithium-codegen-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/full-codegen-ia32.cc ('k') | src/ia32/lithium-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 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 __ cmp(cell_operand, Factory::the_hole_value()); 1907 __ cmp(cell_operand, Factory::the_hole_value());
1908 DeoptimizeIf(equal, instr->environment()); 1908 DeoptimizeIf(equal, instr->environment());
1909 } 1909 }
1910 1910
1911 // Store the value. 1911 // Store the value.
1912 __ mov(cell_operand, value); 1912 __ mov(cell_operand, value);
1913 } 1913 }
1914 1914
1915 1915
1916 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 1916 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
1917 Register context = ToRegister(instr->InputAt(0)); 1917 Register context = ToRegister(instr->context());
1918 Register result = ToRegister(instr->result()); 1918 Register result = ToRegister(instr->result());
1919 __ mov(result, 1919 __ mov(result, ContextOperand(context, instr->slot_index()));
1920 Operand(context, Context::SlotOffset(Context::FCONTEXT_INDEX)));
1921 __ mov(result, ContextOperand(result, instr->slot_index()));
1922 } 1920 }
1923 1921
1924 1922
1925 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { 1923 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
1926 Register context = ToRegister(instr->context()); 1924 Register context = ToRegister(instr->context());
1927 Register value = ToRegister(instr->value()); 1925 Register value = ToRegister(instr->value());
1928 __ mov(context,
1929 Operand(context, Context::SlotOffset(Context::FCONTEXT_INDEX)));
1930 __ mov(ContextOperand(context, instr->slot_index()), value); 1926 __ mov(ContextOperand(context, instr->slot_index()), value);
1931 if (instr->needs_write_barrier()) { 1927 if (instr->needs_write_barrier()) {
1932 Register temp = ToRegister(instr->TempAt(0)); 1928 Register temp = ToRegister(instr->TempAt(0));
1933 int offset = Context::SlotOffset(instr->slot_index()); 1929 int offset = Context::SlotOffset(instr->slot_index());
1934 __ RecordWrite(context, offset, value, temp); 1930 __ RecordWrite(context, offset, value, temp);
1935 } 1931 }
1936 } 1932 }
1937 1933
1938 1934
1939 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 1935 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
(...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after
3638 ASSERT(osr_pc_offset_ == -1); 3634 ASSERT(osr_pc_offset_ == -1);
3639 osr_pc_offset_ = masm()->pc_offset(); 3635 osr_pc_offset_ = masm()->pc_offset();
3640 } 3636 }
3641 3637
3642 3638
3643 #undef __ 3639 #undef __
3644 3640
3645 } } // namespace v8::internal 3641 } } // namespace v8::internal
3646 3642
3647 #endif // V8_TARGET_ARCH_IA32 3643 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698