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

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

Issue 6723014: Avoid TLS access for counters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix lint Created 9 years, 9 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/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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 1 << Map::kHasFastElements); 548 1 << Map::kHasFastElements);
549 __ j(zero, &check_number_dictionary, not_taken); 549 __ j(zero, &check_number_dictionary, not_taken);
550 550
551 GenerateFastArrayLoad(masm, 551 GenerateFastArrayLoad(masm,
552 edx, 552 edx,
553 eax, 553 eax,
554 ecx, 554 ecx,
555 eax, 555 eax,
556 NULL, 556 NULL,
557 &slow); 557 &slow);
558 __ IncrementCounter(COUNTERS->keyed_load_generic_smi(), 1); 558 Isolate* isolate = masm->isolate();
559 Counters* counters = isolate->counters();
560 __ IncrementCounter(counters->keyed_load_generic_smi(), 1);
559 __ ret(0); 561 __ ret(0);
560 562
561 __ bind(&check_number_dictionary); 563 __ bind(&check_number_dictionary);
562 __ mov(ebx, eax); 564 __ mov(ebx, eax);
563 __ SmiUntag(ebx); 565 __ SmiUntag(ebx);
564 __ mov(ecx, FieldOperand(edx, JSObject::kElementsOffset)); 566 __ mov(ecx, FieldOperand(edx, JSObject::kElementsOffset));
565 567
566 // Check whether the elements is a number dictionary. 568 // Check whether the elements is a number dictionary.
567 // edx: receiver 569 // edx: receiver
568 // ebx: untagged index 570 // ebx: untagged index
569 // eax: key 571 // eax: key
570 // ecx: elements 572 // ecx: elements
571 __ CheckMap(ecx, FACTORY->hash_table_map(), &slow, true); 573 __ CheckMap(ecx, isolate->factory()->hash_table_map(), &slow, true);
572 Label slow_pop_receiver; 574 Label slow_pop_receiver;
573 // Push receiver on the stack to free up a register for the dictionary 575 // Push receiver on the stack to free up a register for the dictionary
574 // probing. 576 // probing.
575 __ push(edx); 577 __ push(edx);
576 GenerateNumberDictionaryLoad(masm, 578 GenerateNumberDictionaryLoad(masm,
577 &slow_pop_receiver, 579 &slow_pop_receiver,
578 ecx, 580 ecx,
579 eax, 581 eax,
580 ebx, 582 ebx,
581 edx, 583 edx,
582 edi, 584 edi,
583 eax); 585 eax);
584 // Pop receiver before returning. 586 // Pop receiver before returning.
585 __ pop(edx); 587 __ pop(edx);
586 __ ret(0); 588 __ ret(0);
587 589
588 __ bind(&slow_pop_receiver); 590 __ bind(&slow_pop_receiver);
589 // Pop the receiver from the stack and jump to runtime. 591 // Pop the receiver from the stack and jump to runtime.
590 __ pop(edx); 592 __ pop(edx);
591 593
592 __ bind(&slow); 594 __ bind(&slow);
593 // Slow case: jump to runtime. 595 // Slow case: jump to runtime.
594 // edx: receiver 596 // edx: receiver
595 // eax: key 597 // eax: key
596 __ IncrementCounter(COUNTERS->keyed_load_generic_slow(), 1); 598 __ IncrementCounter(counters->keyed_load_generic_slow(), 1);
597 GenerateRuntimeGetProperty(masm); 599 GenerateRuntimeGetProperty(masm);
598 600
599 __ bind(&check_string); 601 __ bind(&check_string);
600 GenerateKeyStringCheck(masm, eax, ecx, ebx, &index_string, &slow); 602 GenerateKeyStringCheck(masm, eax, ecx, ebx, &index_string, &slow);
601 603
602 GenerateKeyedLoadReceiverCheck( 604 GenerateKeyedLoadReceiverCheck(
603 masm, edx, ecx, Map::kHasNamedInterceptor, &slow); 605 masm, edx, ecx, Map::kHasNamedInterceptor, &slow);
604 606
605 // If the receiver is a fast-case object, check the keyed lookup 607 // If the receiver is a fast-case object, check the keyed lookup
606 // cache. Otherwise probe the dictionary. 608 // cache. Otherwise probe the dictionary.
607 __ mov(ebx, FieldOperand(edx, JSObject::kPropertiesOffset)); 609 __ mov(ebx, FieldOperand(edx, JSObject::kPropertiesOffset));
608 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), 610 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset),
609 Immediate(FACTORY->hash_table_map())); 611 Immediate(isolate->factory()->hash_table_map()));
610 __ j(equal, &probe_dictionary); 612 __ j(equal, &probe_dictionary);
611 613
612 // Load the map of the receiver, compute the keyed lookup cache hash 614 // Load the map of the receiver, compute the keyed lookup cache hash
613 // based on 32 bits of the map pointer and the string hash. 615 // based on 32 bits of the map pointer and the string hash.
614 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); 616 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
615 __ mov(ecx, ebx); 617 __ mov(ecx, ebx);
616 __ shr(ecx, KeyedLookupCache::kMapHashShift); 618 __ shr(ecx, KeyedLookupCache::kMapHashShift);
617 __ mov(edi, FieldOperand(eax, String::kHashFieldOffset)); 619 __ mov(edi, FieldOperand(eax, String::kHashFieldOffset));
618 __ shr(edi, String::kHashShift); 620 __ shr(edi, String::kHashShift);
619 __ xor_(ecx, Operand(edi)); 621 __ xor_(ecx, Operand(edi));
(...skipping 21 matching lines...) Expand all
641 __ mov(edi, 643 __ mov(edi,
642 Operand::StaticArray(ecx, times_pointer_size, cache_field_offsets)); 644 Operand::StaticArray(ecx, times_pointer_size, cache_field_offsets));
643 __ movzx_b(ecx, FieldOperand(ebx, Map::kInObjectPropertiesOffset)); 645 __ movzx_b(ecx, FieldOperand(ebx, Map::kInObjectPropertiesOffset));
644 __ sub(edi, Operand(ecx)); 646 __ sub(edi, Operand(ecx));
645 __ j(above_equal, &property_array_property); 647 __ j(above_equal, &property_array_property);
646 648
647 // Load in-object property. 649 // Load in-object property.
648 __ movzx_b(ecx, FieldOperand(ebx, Map::kInstanceSizeOffset)); 650 __ movzx_b(ecx, FieldOperand(ebx, Map::kInstanceSizeOffset));
649 __ add(ecx, Operand(edi)); 651 __ add(ecx, Operand(edi));
650 __ mov(eax, FieldOperand(edx, ecx, times_pointer_size, 0)); 652 __ mov(eax, FieldOperand(edx, ecx, times_pointer_size, 0));
651 __ IncrementCounter(COUNTERS->keyed_load_generic_lookup_cache(), 1); 653 __ IncrementCounter(counters->keyed_load_generic_lookup_cache(), 1);
652 __ ret(0); 654 __ ret(0);
653 655
654 // Load property array property. 656 // Load property array property.
655 __ bind(&property_array_property); 657 __ bind(&property_array_property);
656 __ mov(eax, FieldOperand(edx, JSObject::kPropertiesOffset)); 658 __ mov(eax, FieldOperand(edx, JSObject::kPropertiesOffset));
657 __ mov(eax, FieldOperand(eax, edi, times_pointer_size, 659 __ mov(eax, FieldOperand(eax, edi, times_pointer_size,
658 FixedArray::kHeaderSize)); 660 FixedArray::kHeaderSize));
659 __ IncrementCounter(COUNTERS->keyed_load_generic_lookup_cache(), 1); 661 __ IncrementCounter(counters->keyed_load_generic_lookup_cache(), 1);
660 __ ret(0); 662 __ ret(0);
661 663
662 // Do a quick inline probe of the receiver's dictionary, if it 664 // Do a quick inline probe of the receiver's dictionary, if it
663 // exists. 665 // exists.
664 __ bind(&probe_dictionary); 666 __ bind(&probe_dictionary);
665 667
666 __ mov(ecx, FieldOperand(edx, JSObject::kMapOffset)); 668 __ mov(ecx, FieldOperand(edx, JSObject::kMapOffset));
667 __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset)); 669 __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset));
668 GenerateGlobalInstanceTypeCheck(masm, ecx, &slow); 670 GenerateGlobalInstanceTypeCheck(masm, ecx, &slow);
669 671
670 GenerateDictionaryLoad(masm, &slow, ebx, eax, ecx, edi, eax); 672 GenerateDictionaryLoad(masm, &slow, ebx, eax, ecx, edi, eax);
671 __ IncrementCounter(COUNTERS->keyed_load_generic_symbol(), 1); 673 __ IncrementCounter(counters->keyed_load_generic_symbol(), 1);
672 __ ret(0); 674 __ ret(0);
673 675
674 __ bind(&index_string); 676 __ bind(&index_string);
675 __ IndexFromHash(ebx, eax); 677 __ IndexFromHash(ebx, eax);
676 // Now jump to the place where smi keys are handled. 678 // Now jump to the place where smi keys are handled.
677 __ jmp(&index_smi); 679 __ jmp(&index_smi);
678 } 680 }
679 681
680 682
681 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { 683 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 int argc, 962 int argc,
961 IC::UtilityId id) { 963 IC::UtilityId id) {
962 // ----------- S t a t e ------------- 964 // ----------- S t a t e -------------
963 // -- ecx : name 965 // -- ecx : name
964 // -- esp[0] : return address 966 // -- esp[0] : return address
965 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 967 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
966 // -- ... 968 // -- ...
967 // -- esp[(argc + 1) * 4] : receiver 969 // -- esp[(argc + 1) * 4] : receiver
968 // ----------------------------------- 970 // -----------------------------------
969 971
972 Counters* counters = masm->isolate()->counters();
970 if (id == IC::kCallIC_Miss) { 973 if (id == IC::kCallIC_Miss) {
971 __ IncrementCounter(COUNTERS->call_miss(), 1); 974 __ IncrementCounter(counters->call_miss(), 1);
972 } else { 975 } else {
973 __ IncrementCounter(COUNTERS->keyed_call_miss(), 1); 976 __ IncrementCounter(counters->keyed_call_miss(), 1);
974 } 977 }
975 978
976 // Get the receiver of the function from the stack; 1 ~ return address. 979 // Get the receiver of the function from the stack; 1 ~ return address.
977 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); 980 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
978 981
979 // Enter an internal frame. 982 // Enter an internal frame.
980 __ EnterInternalFrame(); 983 __ EnterInternalFrame();
981 984
982 // Push the receiver and the name of the function. 985 // Push the receiver and the name of the function.
983 __ push(edx); 986 __ push(edx);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 1088
1086 __ bind(&index_smi); 1089 __ bind(&index_smi);
1087 // Now the key is known to be a smi. This place is also jumped to from 1090 // Now the key is known to be a smi. This place is also jumped to from
1088 // where a numeric string is converted to a smi. 1091 // where a numeric string is converted to a smi.
1089 1092
1090 GenerateKeyedLoadReceiverCheck( 1093 GenerateKeyedLoadReceiverCheck(
1091 masm, edx, eax, Map::kHasIndexedInterceptor, &slow_call); 1094 masm, edx, eax, Map::kHasIndexedInterceptor, &slow_call);
1092 1095
1093 GenerateFastArrayLoad( 1096 GenerateFastArrayLoad(
1094 masm, edx, ecx, eax, edi, &check_number_dictionary, &slow_load); 1097 masm, edx, ecx, eax, edi, &check_number_dictionary, &slow_load);
1095 __ IncrementCounter(COUNTERS->keyed_call_generic_smi_fast(), 1); 1098 Isolate* isolate = masm->isolate();
1099 Counters* counters = isolate->counters();
1100 __ IncrementCounter(counters->keyed_call_generic_smi_fast(), 1);
1096 1101
1097 __ bind(&do_call); 1102 __ bind(&do_call);
1098 // receiver in edx is not used after this point. 1103 // receiver in edx is not used after this point.
1099 // ecx: key 1104 // ecx: key
1100 // edi: function 1105 // edi: function
1101 GenerateFunctionTailCall(masm, argc, &slow_call); 1106 GenerateFunctionTailCall(masm, argc, &slow_call);
1102 1107
1103 __ bind(&check_number_dictionary); 1108 __ bind(&check_number_dictionary);
1104 // eax: elements 1109 // eax: elements
1105 // ecx: smi key 1110 // ecx: smi key
1106 // Check whether the elements is a number dictionary. 1111 // Check whether the elements is a number dictionary.
1107 __ CheckMap(eax, FACTORY->hash_table_map(), &slow_load, true); 1112 __ CheckMap(eax, isolate->factory()->hash_table_map(), &slow_load, true);
1108 __ mov(ebx, ecx); 1113 __ mov(ebx, ecx);
1109 __ SmiUntag(ebx); 1114 __ SmiUntag(ebx);
1110 // ebx: untagged index 1115 // ebx: untagged index
1111 // Receiver in edx will be clobbered, need to reload it on miss. 1116 // Receiver in edx will be clobbered, need to reload it on miss.
1112 GenerateNumberDictionaryLoad( 1117 GenerateNumberDictionaryLoad(
1113 masm, &slow_reload_receiver, eax, ecx, ebx, edx, edi, edi); 1118 masm, &slow_reload_receiver, eax, ecx, ebx, edx, edi, edi);
1114 __ IncrementCounter(COUNTERS->keyed_call_generic_smi_dict(), 1); 1119 __ IncrementCounter(counters->keyed_call_generic_smi_dict(), 1);
1115 __ jmp(&do_call); 1120 __ jmp(&do_call);
1116 1121
1117 __ bind(&slow_reload_receiver); 1122 __ bind(&slow_reload_receiver);
1118 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); 1123 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1119 1124
1120 __ bind(&slow_load); 1125 __ bind(&slow_load);
1121 // This branch is taken when calling KeyedCallIC_Miss is neither required 1126 // This branch is taken when calling KeyedCallIC_Miss is neither required
1122 // nor beneficial. 1127 // nor beneficial.
1123 __ IncrementCounter(COUNTERS->keyed_call_generic_slow_load(), 1); 1128 __ IncrementCounter(counters->keyed_call_generic_slow_load(), 1);
1124 __ EnterInternalFrame(); 1129 __ EnterInternalFrame();
1125 __ push(ecx); // save the key 1130 __ push(ecx); // save the key
1126 __ push(edx); // pass the receiver 1131 __ push(edx); // pass the receiver
1127 __ push(ecx); // pass the key 1132 __ push(ecx); // pass the key
1128 __ CallRuntime(Runtime::kKeyedGetProperty, 2); 1133 __ CallRuntime(Runtime::kKeyedGetProperty, 2);
1129 __ pop(ecx); // restore the key 1134 __ pop(ecx); // restore the key
1130 __ LeaveInternalFrame(); 1135 __ LeaveInternalFrame();
1131 __ mov(edi, eax); 1136 __ mov(edi, eax);
1132 __ jmp(&do_call); 1137 __ jmp(&do_call);
1133 1138
1134 __ bind(&check_string); 1139 __ bind(&check_string);
1135 GenerateKeyStringCheck(masm, ecx, eax, ebx, &index_string, &slow_call); 1140 GenerateKeyStringCheck(masm, ecx, eax, ebx, &index_string, &slow_call);
1136 1141
1137 // The key is known to be a symbol. 1142 // The key is known to be a symbol.
1138 // If the receiver is a regular JS object with slow properties then do 1143 // If the receiver is a regular JS object with slow properties then do
1139 // a quick inline probe of the receiver's dictionary. 1144 // a quick inline probe of the receiver's dictionary.
1140 // Otherwise do the monomorphic cache probe. 1145 // Otherwise do the monomorphic cache probe.
1141 GenerateKeyedLoadReceiverCheck( 1146 GenerateKeyedLoadReceiverCheck(
1142 masm, edx, eax, Map::kHasNamedInterceptor, &lookup_monomorphic_cache); 1147 masm, edx, eax, Map::kHasNamedInterceptor, &lookup_monomorphic_cache);
1143 1148
1144 __ mov(ebx, FieldOperand(edx, JSObject::kPropertiesOffset)); 1149 __ mov(ebx, FieldOperand(edx, JSObject::kPropertiesOffset));
1145 __ CheckMap(ebx, FACTORY->hash_table_map(), &lookup_monomorphic_cache, true); 1150 __ CheckMap(ebx,
1151 isolate->factory()->hash_table_map(),
1152 &lookup_monomorphic_cache,
1153 true);
1146 1154
1147 GenerateDictionaryLoad(masm, &slow_load, ebx, ecx, eax, edi, edi); 1155 GenerateDictionaryLoad(masm, &slow_load, ebx, ecx, eax, edi, edi);
1148 __ IncrementCounter(COUNTERS->keyed_call_generic_lookup_dict(), 1); 1156 __ IncrementCounter(counters->keyed_call_generic_lookup_dict(), 1);
1149 __ jmp(&do_call); 1157 __ jmp(&do_call);
1150 1158
1151 __ bind(&lookup_monomorphic_cache); 1159 __ bind(&lookup_monomorphic_cache);
1152 __ IncrementCounter(COUNTERS->keyed_call_generic_lookup_cache(), 1); 1160 __ IncrementCounter(counters->keyed_call_generic_lookup_cache(), 1);
1153 GenerateMonomorphicCacheProbe(masm, argc, Code::KEYED_CALL_IC); 1161 GenerateMonomorphicCacheProbe(masm, argc, Code::KEYED_CALL_IC);
1154 // Fall through on miss. 1162 // Fall through on miss.
1155 1163
1156 __ bind(&slow_call); 1164 __ bind(&slow_call);
1157 // This branch is taken if: 1165 // This branch is taken if:
1158 // - the receiver requires boxing or access check, 1166 // - the receiver requires boxing or access check,
1159 // - the key is neither smi nor symbol, 1167 // - the key is neither smi nor symbol,
1160 // - the value loaded is not a function, 1168 // - the value loaded is not a function,
1161 // - there is hope that the runtime will create a monomorphic call stub 1169 // - there is hope that the runtime will create a monomorphic call stub
1162 // that will get fetched next time. 1170 // that will get fetched next time.
1163 __ IncrementCounter(COUNTERS->keyed_call_generic_slow(), 1); 1171 __ IncrementCounter(counters->keyed_call_generic_slow(), 1);
1164 GenerateMiss(masm, argc); 1172 GenerateMiss(masm, argc);
1165 1173
1166 __ bind(&index_string); 1174 __ bind(&index_string);
1167 __ IndexFromHash(ebx, ecx); 1175 __ IndexFromHash(ebx, ecx);
1168 // Now jump to the place where smi keys are handled. 1176 // Now jump to the place where smi keys are handled.
1169 __ jmp(&index_smi); 1177 __ jmp(&index_smi);
1170 } 1178 }
1171 1179
1172 1180
1173 void KeyedCallIC::GenerateNormal(MacroAssembler* masm, int argc) { 1181 void KeyedCallIC::GenerateNormal(MacroAssembler* masm, int argc) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 } 1252 }
1245 1253
1246 1254
1247 void LoadIC::GenerateMiss(MacroAssembler* masm) { 1255 void LoadIC::GenerateMiss(MacroAssembler* masm) {
1248 // ----------- S t a t e ------------- 1256 // ----------- S t a t e -------------
1249 // -- eax : receiver 1257 // -- eax : receiver
1250 // -- ecx : name 1258 // -- ecx : name
1251 // -- esp[0] : return address 1259 // -- esp[0] : return address
1252 // ----------------------------------- 1260 // -----------------------------------
1253 1261
1254 __ IncrementCounter(COUNTERS->load_miss(), 1); 1262 __ IncrementCounter(masm->isolate()->counters()->load_miss(), 1);
1255 1263
1256 __ pop(ebx); 1264 __ pop(ebx);
1257 __ push(eax); // receiver 1265 __ push(eax); // receiver
1258 __ push(ecx); // name 1266 __ push(ecx); // name
1259 __ push(ebx); // return address 1267 __ push(ebx); // return address
1260 1268
1261 // Perform tail call to the entry. 1269 // Perform tail call to the entry.
1262 ExternalReference ref = 1270 ExternalReference ref =
1263 ExternalReference(IC_Utility(kLoadIC_Miss), masm->isolate()); 1271 ExternalReference(IC_Utility(kLoadIC_Miss), masm->isolate());
1264 __ TailCallExternalReference(ref, 2, 1); 1272 __ TailCallExternalReference(ref, 2, 1);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 } 1439 }
1432 1440
1433 1441
1434 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 1442 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
1435 // ----------- S t a t e ------------- 1443 // ----------- S t a t e -------------
1436 // -- eax : key 1444 // -- eax : key
1437 // -- edx : receiver 1445 // -- edx : receiver
1438 // -- esp[0] : return address 1446 // -- esp[0] : return address
1439 // ----------------------------------- 1447 // -----------------------------------
1440 1448
1441 __ IncrementCounter(COUNTERS->keyed_load_miss(), 1); 1449 __ IncrementCounter(masm->isolate()->counters()->keyed_load_miss(), 1);
1442 1450
1443 __ pop(ebx); 1451 __ pop(ebx);
1444 __ push(edx); // receiver 1452 __ push(edx); // receiver
1445 __ push(eax); // name 1453 __ push(eax); // name
1446 __ push(ebx); // return address 1454 __ push(ebx); // return address
1447 1455
1448 // Perform tail call to the entry. 1456 // Perform tail call to the entry.
1449 ExternalReference ref = 1457 ExternalReference ref =
1450 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), masm->isolate()); 1458 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), masm->isolate());
1451 __ TailCallExternalReference(ref, 2, 1); 1459 __ TailCallExternalReference(ref, 2, 1);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 Label miss, restore_miss; 1590 Label miss, restore_miss;
1583 1591
1584 GenerateStringDictionaryReceiverCheck(masm, edx, ebx, edi, &miss); 1592 GenerateStringDictionaryReceiverCheck(masm, edx, ebx, edi, &miss);
1585 1593
1586 // A lot of registers are needed for storing to slow case 1594 // A lot of registers are needed for storing to slow case
1587 // objects. Push and restore receiver but rely on 1595 // objects. Push and restore receiver but rely on
1588 // GenerateDictionaryStore preserving the value and name. 1596 // GenerateDictionaryStore preserving the value and name.
1589 __ push(edx); 1597 __ push(edx);
1590 GenerateDictionaryStore(masm, &restore_miss, ebx, ecx, eax, edx, edi); 1598 GenerateDictionaryStore(masm, &restore_miss, ebx, ecx, eax, edx, edi);
1591 __ Drop(1); 1599 __ Drop(1);
1592 __ IncrementCounter(COUNTERS->store_normal_hit(), 1); 1600 Counters* counters = masm->isolate()->counters();
1601 __ IncrementCounter(counters->store_normal_hit(), 1);
1593 __ ret(0); 1602 __ ret(0);
1594 1603
1595 __ bind(&restore_miss); 1604 __ bind(&restore_miss);
1596 __ pop(edx); 1605 __ pop(edx);
1597 1606
1598 __ bind(&miss); 1607 __ bind(&miss);
1599 __ IncrementCounter(COUNTERS->store_normal_miss(), 1); 1608 __ IncrementCounter(counters->store_normal_miss(), 1);
1600 GenerateMiss(masm); 1609 GenerateMiss(masm);
1601 } 1610 }
1602 1611
1603 1612
1604 void StoreIC::GenerateGlobalProxy(MacroAssembler* masm, 1613 void StoreIC::GenerateGlobalProxy(MacroAssembler* masm,
1605 StrictModeFlag strict_mode) { 1614 StrictModeFlag strict_mode) {
1606 // ----------- S t a t e ------------- 1615 // ----------- S t a t e -------------
1607 // -- eax : value 1616 // -- eax : value
1608 // -- ecx : name 1617 // -- ecx : name
1609 // -- edx : receiver 1618 // -- edx : receiver
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 Condition cc = *jmp_address == Assembler::kJncShortOpcode 1770 Condition cc = *jmp_address == Assembler::kJncShortOpcode
1762 ? not_zero 1771 ? not_zero
1763 : zero; 1772 : zero;
1764 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1773 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1765 } 1774 }
1766 1775
1767 1776
1768 } } // namespace v8::internal 1777 } } // namespace v8::internal
1769 1778
1770 #endif // V8_TARGET_ARCH_IA32 1779 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-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