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

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

Issue 2493001: - Continue removing [static] qualifier from StubCache. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 years, 6 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/handles.cc ('k') | src/ic.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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 // -- esp[(argc + 1) * 4] : receiver 1047 // -- esp[(argc + 1) * 4] : receiver
1048 // ----------------------------------- 1048 // -----------------------------------
1049 Label number, non_number, non_string, boolean, probe, miss; 1049 Label number, non_number, non_string, boolean, probe, miss;
1050 1050
1051 // Get the receiver of the function from the stack; 1 ~ return address. 1051 // Get the receiver of the function from the stack; 1 ~ return address.
1052 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); 1052 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1053 1053
1054 // Probe the stub cache. 1054 // Probe the stub cache.
1055 Code::Flags flags = 1055 Code::Flags flags =
1056 Code::ComputeFlags(Code::CALL_IC, NOT_IN_LOOP, MONOMORPHIC, NORMAL, argc); 1056 Code::ComputeFlags(Code::CALL_IC, NOT_IN_LOOP, MONOMORPHIC, NORMAL, argc);
1057 StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, eax); 1057 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx,
1058 eax);
1058 1059
1059 // If the stub cache probing failed, the receiver might be a value. 1060 // If the stub cache probing failed, the receiver might be a value.
1060 // For value objects, we use the map of the prototype objects for 1061 // For value objects, we use the map of the prototype objects for
1061 // the corresponding JSValue for the cache and that is what we need 1062 // the corresponding JSValue for the cache and that is what we need
1062 // to probe. 1063 // to probe.
1063 // 1064 //
1064 // Check for number. 1065 // Check for number.
1065 __ test(edx, Immediate(kSmiTagMask)); 1066 __ test(edx, Immediate(kSmiTagMask));
1066 __ j(zero, &number, not_taken); 1067 __ j(zero, &number, not_taken);
1067 __ CmpObjectType(edx, HEAP_NUMBER_TYPE, ebx); 1068 __ CmpObjectType(edx, HEAP_NUMBER_TYPE, ebx);
(...skipping 16 matching lines...) Expand all
1084 __ cmp(edx, Factory::true_value()); 1085 __ cmp(edx, Factory::true_value());
1085 __ j(equal, &boolean, not_taken); 1086 __ j(equal, &boolean, not_taken);
1086 __ cmp(edx, Factory::false_value()); 1087 __ cmp(edx, Factory::false_value());
1087 __ j(not_equal, &miss, taken); 1088 __ j(not_equal, &miss, taken);
1088 __ bind(&boolean); 1089 __ bind(&boolean);
1089 StubCompiler::GenerateLoadGlobalFunctionPrototype( 1090 StubCompiler::GenerateLoadGlobalFunctionPrototype(
1090 masm, Context::BOOLEAN_FUNCTION_INDEX, edx); 1091 masm, Context::BOOLEAN_FUNCTION_INDEX, edx);
1091 1092
1092 // Probe the stub cache for the value object. 1093 // Probe the stub cache for the value object.
1093 __ bind(&probe); 1094 __ bind(&probe);
1094 StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, no_reg); 1095 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx,
1096 no_reg);
1095 1097
1096 // Cache miss: Jump to runtime. 1098 // Cache miss: Jump to runtime.
1097 __ bind(&miss); 1099 __ bind(&miss);
1098 GenerateMiss(masm, argc); 1100 GenerateMiss(masm, argc);
1099 } 1101 }
1100 1102
1101 1103
1102 static void GenerateNormalHelper(MacroAssembler* masm, 1104 static void GenerateNormalHelper(MacroAssembler* masm,
1103 int argc, 1105 int argc,
1104 bool is_global_object, 1106 bool is_global_object,
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 // ----------- S t a t e ------------- 1262 // ----------- S t a t e -------------
1261 // -- eax : receiver 1263 // -- eax : receiver
1262 // -- ecx : name 1264 // -- ecx : name
1263 // -- esp[0] : return address 1265 // -- esp[0] : return address
1264 // ----------------------------------- 1266 // -----------------------------------
1265 1267
1266 // Probe the stub cache. 1268 // Probe the stub cache.
1267 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, 1269 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC,
1268 NOT_IN_LOOP, 1270 NOT_IN_LOOP,
1269 MONOMORPHIC); 1271 MONOMORPHIC);
1270 StubCache::GenerateProbe(masm, flags, eax, ecx, ebx, edx); 1272 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, eax, ecx, ebx,
1273 edx);
1271 1274
1272 // Cache miss: Jump to runtime. 1275 // Cache miss: Jump to runtime.
1273 GenerateMiss(masm); 1276 GenerateMiss(masm);
1274 } 1277 }
1275 1278
1276 1279
1277 void LoadIC::GenerateNormal(MacroAssembler* masm) { 1280 void LoadIC::GenerateNormal(MacroAssembler* masm) {
1278 // ----------- S t a t e ------------- 1281 // ----------- S t a t e -------------
1279 // -- eax : receiver 1282 // -- eax : receiver
1280 // -- ecx : name 1283 // -- ecx : name
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 // ----------- S t a t e ------------- 1486 // ----------- S t a t e -------------
1484 // -- eax : value 1487 // -- eax : value
1485 // -- ecx : name 1488 // -- ecx : name
1486 // -- edx : receiver 1489 // -- edx : receiver
1487 // -- esp[0] : return address 1490 // -- esp[0] : return address
1488 // ----------------------------------- 1491 // -----------------------------------
1489 1492
1490 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, 1493 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC,
1491 NOT_IN_LOOP, 1494 NOT_IN_LOOP,
1492 MONOMORPHIC); 1495 MONOMORPHIC);
1493 StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, no_reg); 1496 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx,
1497 no_reg);
1494 1498
1495 // Cache miss: Jump to runtime. 1499 // Cache miss: Jump to runtime.
1496 GenerateMiss(masm); 1500 GenerateMiss(masm);
1497 } 1501 }
1498 1502
1499 1503
1500 void StoreIC::GenerateMiss(MacroAssembler* masm) { 1504 void StoreIC::GenerateMiss(MacroAssembler* masm) {
1501 // ----------- S t a t e ------------- 1505 // ----------- S t a t e -------------
1502 // -- eax : value 1506 // -- eax : value
1503 // -- ecx : name 1507 // -- ecx : name
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 ExternalReference ref = ExternalReference(IC_Utility(kKeyedStoreIC_Miss)); 1613 ExternalReference ref = ExternalReference(IC_Utility(kKeyedStoreIC_Miss));
1610 __ TailCallExternalReference(ref, 3, 1); 1614 __ TailCallExternalReference(ref, 3, 1);
1611 } 1615 }
1612 1616
1613 #undef __ 1617 #undef __
1614 1618
1615 1619
1616 } } // namespace v8::internal 1620 } } // namespace v8::internal
1617 1621
1618 #endif // V8_TARGET_ARCH_IA32 1622 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698