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

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

Issue 6344005: Introduce extra IC state to record additional feedback from IC-s. (Closed)
Patch Set: Last fixes and ports to arm and x64 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
« no previous file with comments | « src/arm/stub-cache-arm.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 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 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 static void GenerateMonomorphicCacheProbe(MacroAssembler* masm, 1224 static void GenerateMonomorphicCacheProbe(MacroAssembler* masm,
1225 int argc, 1225 int argc,
1226 Code::Kind kind) { 1226 Code::Kind kind) {
1227 // ----------- S t a t e ------------- 1227 // ----------- S t a t e -------------
1228 // -- ecx : name 1228 // -- ecx : name
1229 // -- edx : receiver 1229 // -- edx : receiver
1230 // ----------------------------------- 1230 // -----------------------------------
1231 Label number, non_number, non_string, boolean, probe, miss; 1231 Label number, non_number, non_string, boolean, probe, miss;
1232 1232
1233 // Probe the stub cache. 1233 // Probe the stub cache.
1234 Code::Flags flags = 1234 Code::Flags flags = Code::ComputeFlags(kind,
1235 Code::ComputeFlags(kind, NOT_IN_LOOP, MONOMORPHIC, NORMAL, argc); 1235 NOT_IN_LOOP,
1236 MONOMORPHIC,
1237 Code::kNoExtraICState,
1238 NORMAL,
1239 argc);
1236 StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, eax); 1240 StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, eax);
1237 1241
1238 // If the stub cache probing failed, the receiver might be a value. 1242 // If the stub cache probing failed, the receiver might be a value.
1239 // For value objects, we use the map of the prototype objects for 1243 // For value objects, we use the map of the prototype objects for
1240 // the corresponding JSValue for the cache and that is what we need 1244 // the corresponding JSValue for the cache and that is what we need
1241 // to probe. 1245 // to probe.
1242 // 1246 //
1243 // Check for number. 1247 // Check for number.
1244 __ test(edx, Immediate(kSmiTagMask)); 1248 __ test(edx, Immediate(kSmiTagMask));
1245 __ j(zero, &number, not_taken); 1249 __ j(zero, &number, not_taken);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 1322
1319 // eax: elements 1323 // eax: elements
1320 // Search the dictionary placing the result in edi. 1324 // Search the dictionary placing the result in edi.
1321 GenerateDictionaryLoad(masm, &miss, eax, ecx, edi, ebx, edi); 1325 GenerateDictionaryLoad(masm, &miss, eax, ecx, edi, ebx, edi);
1322 GenerateFunctionTailCall(masm, argc, &miss); 1326 GenerateFunctionTailCall(masm, argc, &miss);
1323 1327
1324 __ bind(&miss); 1328 __ bind(&miss);
1325 } 1329 }
1326 1330
1327 1331
1328 static void GenerateCallMiss(MacroAssembler* masm, int argc, IC::UtilityId id) { 1332 static void GenerateCallMiss(MacroAssembler* masm,
1333 int argc,
1334 IC::UtilityId id) {
1329 // ----------- S t a t e ------------- 1335 // ----------- S t a t e -------------
1330 // -- ecx : name 1336 // -- ecx : name
1331 // -- esp[0] : return address 1337 // -- esp[0] : return address
1332 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 1338 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1333 // -- ... 1339 // -- ...
1334 // -- esp[(argc + 1) * 4] : receiver 1340 // -- esp[(argc + 1) * 4] : receiver
1335 // ----------------------------------- 1341 // -----------------------------------
1336 1342
1337 if (id == IC::kCallIC_Miss) { 1343 if (id == IC::kCallIC_Miss) {
1338 __ IncrementCounter(&Counters::call_miss, 1); 1344 __ IncrementCounter(&Counters::call_miss, 1);
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 Condition cc = *jmp_address == Assembler::kJncShortOpcode 2113 Condition cc = *jmp_address == Assembler::kJncShortOpcode
2108 ? not_zero 2114 ? not_zero
2109 : zero; 2115 : zero;
2110 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 2116 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
2111 } 2117 }
2112 2118
2113 2119
2114 } } // namespace v8::internal 2120 } } // namespace v8::internal
2115 2121
2116 #endif // V8_TARGET_ARCH_IA32 2122 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698