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

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

Issue 6515013: Merge r6773 to 3.0 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.0/
Patch Set: '' Created 9 years, 10 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/arm/macro-assembler-arm.cc ('k') | src/version.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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // |done| label if a property with the given name is found leaving the 101 // |done| label if a property with the given name is found leaving the
102 // index into the dictionary in |r0|. Jump to the |miss| label 102 // index into the dictionary in |r0|. Jump to the |miss| label
103 // otherwise. 103 // otherwise.
104 static void GenerateStringDictionaryProbes(MacroAssembler* masm, 104 static void GenerateStringDictionaryProbes(MacroAssembler* masm,
105 Label* miss, 105 Label* miss,
106 Label* done, 106 Label* done,
107 Register elements, 107 Register elements,
108 Register name, 108 Register name,
109 Register r0, 109 Register r0,
110 Register r1) { 110 Register r1) {
111 // Assert that name contains a string.
112 if (FLAG_debug_code) __ AbortIfNotString(name);
113
111 // Compute the capacity mask. 114 // Compute the capacity mask.
112 const int kCapacityOffset = 115 const int kCapacityOffset =
113 StringDictionary::kHeaderSize + 116 StringDictionary::kHeaderSize +
114 StringDictionary::kCapacityIndex * kPointerSize; 117 StringDictionary::kCapacityIndex * kPointerSize;
115 __ mov(r1, FieldOperand(elements, kCapacityOffset)); 118 __ mov(r1, FieldOperand(elements, kCapacityOffset));
116 __ shr(r1, kSmiTagSize); // convert smi to int 119 __ shr(r1, kSmiTagSize); // convert smi to int
117 __ dec(r1); 120 __ dec(r1);
118 121
119 // Generate an unrolled loop that performs a few probes before 122 // Generate an unrolled loop that performs a few probes before
120 // giving up. Measurements done on Gmail indicate that 2 probes 123 // giving up. Measurements done on Gmail indicate that 2 probes
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 1208
1206 void KeyedCallIC::GenerateNormal(MacroAssembler* masm, int argc) { 1209 void KeyedCallIC::GenerateNormal(MacroAssembler* masm, int argc) {
1207 // ----------- S t a t e ------------- 1210 // ----------- S t a t e -------------
1208 // -- ecx : name 1211 // -- ecx : name
1209 // -- esp[0] : return address 1212 // -- esp[0] : return address
1210 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 1213 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1211 // -- ... 1214 // -- ...
1212 // -- esp[(argc + 1) * 4] : receiver 1215 // -- esp[(argc + 1) * 4] : receiver
1213 // ----------------------------------- 1216 // -----------------------------------
1214 1217
1218 // Check if the name is a string.
1219 Label miss;
1220 __ test(ecx, Immediate(kSmiTagMask));
1221 __ j(zero, &miss);
1222 Condition cond = masm->IsObjectStringType(ecx, eax, eax);
1223 __ j(NegateCondition(cond), &miss);
1215 GenerateCallNormal(masm, argc); 1224 GenerateCallNormal(masm, argc);
1225 __ bind(&miss);
1216 GenerateMiss(masm, argc); 1226 GenerateMiss(masm, argc);
1217 } 1227 }
1218 1228
1219 1229
1220 void KeyedCallIC::GenerateMiss(MacroAssembler* masm, int argc) { 1230 void KeyedCallIC::GenerateMiss(MacroAssembler* masm, int argc) {
1221 // ----------- S t a t e ------------- 1231 // ----------- S t a t e -------------
1222 // -- ecx : name 1232 // -- ecx : name
1223 // -- esp[0] : return address 1233 // -- esp[0] : return address
1224 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 1234 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1225 // -- ... 1235 // -- ...
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 Condition cc = *jmp_address == Assembler::kJncShortOpcode 1783 Condition cc = *jmp_address == Assembler::kJncShortOpcode
1774 ? not_zero 1784 ? not_zero
1775 : zero; 1785 : zero;
1776 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1786 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1777 } 1787 }
1778 1788
1779 1789
1780 } } // namespace v8::internal 1790 } } // namespace v8::internal
1781 1791
1782 #endif // V8_TARGET_ARCH_IA32 1792 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698