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

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

Issue 6020012: Cleanup of x64 code. Rearrange functions in ic-x64.cc to match order in ic-i... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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 | « no previous file | src/x64/assembler-x64.h » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 } 1212 }
1213 __ ret(0); // Return the original value. 1213 __ ret(0); // Return the original value.
1214 } 1214 }
1215 1215
1216 // Slow case: call runtime. 1216 // Slow case: call runtime.
1217 __ bind(&slow); 1217 __ bind(&slow);
1218 GenerateRuntimeSetProperty(masm); 1218 GenerateRuntimeSetProperty(masm);
1219 } 1219 }
1220 1220
1221 1221
1222 // Defined in ic.cc.
1223 Object* CallIC_Miss(Arguments args);
1224
1225 // The generated code does not accept smi keys. 1222 // The generated code does not accept smi keys.
1226 // The generated code falls through if both probes miss. 1223 // The generated code falls through if both probes miss.
1227 static void GenerateMonomorphicCacheProbe(MacroAssembler* masm, 1224 static void GenerateMonomorphicCacheProbe(MacroAssembler* masm,
1228 int argc, 1225 int argc,
1229 Code::Kind kind) { 1226 Code::Kind kind) {
1230 // ----------- S t a t e ------------- 1227 // ----------- S t a t e -------------
1231 // -- ecx : name 1228 // -- ecx : name
1232 // -- edx : receiver 1229 // -- edx : receiver
1233 // ----------------------------------- 1230 // -----------------------------------
1234 Label number, non_number, non_string, boolean, probe, miss; 1231 Label number, non_number, non_string, boolean, probe, miss;
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 // -- esp[0] : return address 1557 // -- esp[0] : return address
1561 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 1558 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1562 // -- ... 1559 // -- ...
1563 // -- esp[(argc + 1) * 4] : receiver 1560 // -- esp[(argc + 1) * 4] : receiver
1564 // ----------------------------------- 1561 // -----------------------------------
1565 1562
1566 GenerateCallMiss(masm, argc, IC::kKeyedCallIC_Miss); 1563 GenerateCallMiss(masm, argc, IC::kKeyedCallIC_Miss);
1567 } 1564 }
1568 1565
1569 1566
1570 // Defined in ic.cc.
1571 Object* LoadIC_Miss(Arguments args);
1572
1573 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 1567 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
1574 // ----------- S t a t e ------------- 1568 // ----------- S t a t e -------------
1575 // -- eax : receiver 1569 // -- eax : receiver
1576 // -- ecx : name 1570 // -- ecx : name
1577 // -- esp[0] : return address 1571 // -- esp[0] : return address
1578 // ----------------------------------- 1572 // -----------------------------------
1579 1573
1580 // Probe the stub cache. 1574 // Probe the stub cache.
1581 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, 1575 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC,
1582 NOT_IN_LOOP, 1576 NOT_IN_LOOP,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 bool KeyedLoadIC::PatchInlinedLoad(Address address, Object* map) { 1782 bool KeyedLoadIC::PatchInlinedLoad(Address address, Object* map) {
1789 return PatchInlinedMapCheck(address, map); 1783 return PatchInlinedMapCheck(address, map);
1790 } 1784 }
1791 1785
1792 1786
1793 bool KeyedStoreIC::PatchInlinedStore(Address address, Object* map) { 1787 bool KeyedStoreIC::PatchInlinedStore(Address address, Object* map) {
1794 return PatchInlinedMapCheck(address, map); 1788 return PatchInlinedMapCheck(address, map);
1795 } 1789 }
1796 1790
1797 1791
1798 // Defined in ic.cc.
1799 Object* KeyedLoadIC_Miss(Arguments args);
1800
1801
1802 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 1792 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
1803 // ----------- S t a t e ------------- 1793 // ----------- S t a t e -------------
1804 // -- eax : key 1794 // -- eax : key
1805 // -- edx : receiver 1795 // -- edx : receiver
1806 // -- esp[0] : return address 1796 // -- esp[0] : return address
1807 // ----------------------------------- 1797 // -----------------------------------
1808 1798
1809 __ IncrementCounter(&Counters::keyed_load_miss, 1); 1799 __ IncrementCounter(&Counters::keyed_load_miss, 1);
1810 1800
1811 __ pop(ebx); 1801 __ pop(ebx);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 __ push(edx); 1965 __ push(edx);
1976 __ push(ecx); 1966 __ push(ecx);
1977 __ push(eax); 1967 __ push(eax);
1978 __ push(ebx); 1968 __ push(ebx);
1979 1969
1980 // Do tail-call to runtime routine. 1970 // Do tail-call to runtime routine.
1981 __ TailCallRuntime(Runtime::kSetProperty, 3, 1); 1971 __ TailCallRuntime(Runtime::kSetProperty, 3, 1);
1982 } 1972 }
1983 1973
1984 1974
1985 // Defined in ic.cc.
1986 Object* KeyedStoreIC_Miss(Arguments args);
1987
1988 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm) { 1975 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm) {
1989 // ----------- S t a t e ------------- 1976 // ----------- S t a t e -------------
1990 // -- eax : value 1977 // -- eax : value
1991 // -- ecx : key 1978 // -- ecx : key
1992 // -- edx : receiver 1979 // -- edx : receiver
1993 // -- esp[0] : return address 1980 // -- esp[0] : return address
1994 // ----------------------------------- 1981 // -----------------------------------
1995 1982
1996 __ pop(ebx); 1983 __ pop(ebx);
1997 __ push(edx); 1984 __ push(edx);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2120 Condition cc = *jmp_address == Assembler::kJncShortOpcode 2107 Condition cc = *jmp_address == Assembler::kJncShortOpcode
2121 ? not_zero 2108 ? not_zero
2122 : zero; 2109 : zero;
2123 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 2110 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
2124 } 2111 }
2125 2112
2126 2113
2127 } } // namespace v8::internal 2114 } } // namespace v8::internal
2128 2115
2129 #endif // V8_TARGET_ARCH_IA32 2116 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698