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

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

Issue 10254005: ia32: Redefine register usage in LoadIC/KeyedLoadIC to match StoreIC and KeyedStoreIC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments; removed debug code Created 8 years, 7 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/stub-cache-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1862 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { 1862 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
1863 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; 1863 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell;
1864 return instr->RequiresHoleCheck() 1864 return instr->RequiresHoleCheck()
1865 ? AssignEnvironment(DefineAsRegister(result)) 1865 ? AssignEnvironment(DefineAsRegister(result))
1866 : DefineAsRegister(result); 1866 : DefineAsRegister(result);
1867 } 1867 }
1868 1868
1869 1869
1870 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { 1870 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
1871 LOperand* context = UseFixed(instr->context(), esi); 1871 LOperand* context = UseFixed(instr->context(), esi);
1872 LOperand* global_object = UseFixed(instr->global_object(), eax); 1872 LOperand* global_object = UseFixed(instr->global_object(), edx);
1873 LLoadGlobalGeneric* result = 1873 LLoadGlobalGeneric* result =
1874 new(zone()) LLoadGlobalGeneric(context, global_object); 1874 new(zone()) LLoadGlobalGeneric(context, global_object);
1875 return MarkAsCall(DefineFixed(result, eax), instr); 1875 return MarkAsCall(DefineFixed(result, eax), instr);
1876 } 1876 }
1877 1877
1878 1878
1879 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { 1879 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
1880 LStoreGlobalCell* result = 1880 LStoreGlobalCell* result =
1881 new(zone()) LStoreGlobalCell(UseRegister(instr->value())); 1881 new(zone()) LStoreGlobalCell(UseRegister(instr->value()));
1882 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; 1882 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 LOperand* obj = UseRegisterAtStart(instr->object()); 1922 LOperand* obj = UseRegisterAtStart(instr->object());
1923 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); 1923 return DefineAsRegister(new(zone()) LLoadNamedField(obj));
1924 } 1924 }
1925 1925
1926 1926
1927 LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic( 1927 LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic(
1928 HLoadNamedFieldPolymorphic* instr) { 1928 HLoadNamedFieldPolymorphic* instr) {
1929 ASSERT(instr->representation().IsTagged()); 1929 ASSERT(instr->representation().IsTagged());
1930 if (instr->need_generic()) { 1930 if (instr->need_generic()) {
1931 LOperand* context = UseFixed(instr->context(), esi); 1931 LOperand* context = UseFixed(instr->context(), esi);
1932 LOperand* obj = UseFixed(instr->object(), eax); 1932 LOperand* obj = UseFixed(instr->object(), edx);
1933 LLoadNamedFieldPolymorphic* result = 1933 LLoadNamedFieldPolymorphic* result =
1934 new(zone()) LLoadNamedFieldPolymorphic(context, obj); 1934 new(zone()) LLoadNamedFieldPolymorphic(context, obj);
1935 return MarkAsCall(DefineFixed(result, eax), instr); 1935 return MarkAsCall(DefineFixed(result, eax), instr);
1936 } else { 1936 } else {
1937 LOperand* context = UseAny(instr->context()); // Not actually used. 1937 LOperand* context = UseAny(instr->context()); // Not actually used.
1938 LOperand* obj = UseRegisterAtStart(instr->object()); 1938 LOperand* obj = UseRegisterAtStart(instr->object());
1939 LLoadNamedFieldPolymorphic* result = 1939 LLoadNamedFieldPolymorphic* result =
1940 new(zone()) LLoadNamedFieldPolymorphic(context, obj); 1940 new(zone()) LLoadNamedFieldPolymorphic(context, obj);
1941 return AssignEnvironment(DefineAsRegister(result)); 1941 return AssignEnvironment(DefineAsRegister(result));
1942 } 1942 }
1943 } 1943 }
1944 1944
1945 1945
1946 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 1946 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
1947 LOperand* context = UseFixed(instr->context(), esi); 1947 LOperand* context = UseFixed(instr->context(), esi);
1948 LOperand* object = UseFixed(instr->object(), eax); 1948 LOperand* object = UseFixed(instr->object(), edx);
1949 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(context, object); 1949 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(context, object);
1950 return MarkAsCall(DefineFixed(result, eax), instr); 1950 return MarkAsCall(DefineFixed(result, eax), instr);
1951 } 1951 }
1952 1952
1953 1953
1954 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 1954 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
1955 HLoadFunctionPrototype* instr) { 1955 HLoadFunctionPrototype* instr) {
1956 return AssignEnvironment(DefineAsRegister( 1956 return AssignEnvironment(DefineAsRegister(
1957 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function()), 1957 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function()),
1958 TempRegister()))); 1958 TempRegister())));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 // has an environment. 2017 // has an environment.
2018 return (elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS) 2018 return (elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS)
2019 ? AssignEnvironment(load_instr) 2019 ? AssignEnvironment(load_instr)
2020 : load_instr; 2020 : load_instr;
2021 } 2021 }
2022 2022
2023 2023
2024 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2024 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
2025 LOperand* context = UseFixed(instr->context(), esi); 2025 LOperand* context = UseFixed(instr->context(), esi);
2026 LOperand* object = UseFixed(instr->object(), edx); 2026 LOperand* object = UseFixed(instr->object(), edx);
2027 LOperand* key = UseFixed(instr->key(), eax); 2027 LOperand* key = UseFixed(instr->key(), ecx);
2028 2028
2029 LLoadKeyedGeneric* result = 2029 LLoadKeyedGeneric* result =
2030 new(zone()) LLoadKeyedGeneric(context, object, key); 2030 new(zone()) LLoadKeyedGeneric(context, object, key);
2031 return MarkAsCall(DefineFixed(result, eax), instr); 2031 return MarkAsCall(DefineFixed(result, eax), instr);
2032 } 2032 }
2033 2033
2034 2034
2035 LInstruction* LChunkBuilder::DoStoreKeyedFastElement( 2035 LInstruction* LChunkBuilder::DoStoreKeyedFastElement(
2036 HStoreKeyedFastElement* instr) { 2036 HStoreKeyedFastElement* instr) {
2037 bool needs_write_barrier = instr->NeedsWriteBarrier(); 2037 bool needs_write_barrier = instr->NeedsWriteBarrier();
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
2448 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2448 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2449 LOperand* object = UseRegister(instr->object()); 2449 LOperand* object = UseRegister(instr->object());
2450 LOperand* index = UseTempRegister(instr->index()); 2450 LOperand* index = UseTempRegister(instr->index());
2451 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2451 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2452 } 2452 }
2453 2453
2454 2454
2455 } } // namespace v8::internal 2455 } } // namespace v8::internal
2456 2456
2457 #endif // V8_TARGET_ARCH_IA32 2457 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698