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

Side by Side Diff: src/x64/ic-x64.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/version.cc ('k') | src/x64/macro-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 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 |r1|. Jump to the |miss| label 102 // index into the dictionary in |r1|. 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 __ SmiToInteger32(r0, FieldOperand(elements, kCapacityOffset)); 118 __ SmiToInteger32(r0, FieldOperand(elements, kCapacityOffset));
116 __ decl(r0); 119 __ decl(r0);
117 120
118 // Generate an unrolled loop that performs a few probes before 121 // Generate an unrolled loop that performs a few probes before
119 // giving up. Measurements done on Gmail indicate that 2 probes 122 // giving up. Measurements done on Gmail indicate that 2 probes
120 // cover ~93% of loads from dictionaries. 123 // cover ~93% of loads from dictionaries.
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 // ----------- S t a t e ------------- 1234 // ----------- S t a t e -------------
1232 // rcx : function name 1235 // rcx : function name
1233 // rsp[0] : return address 1236 // rsp[0] : return address
1234 // rsp[8] : argument argc 1237 // rsp[8] : argument argc
1235 // rsp[16] : argument argc - 1 1238 // rsp[16] : argument argc - 1
1236 // ... 1239 // ...
1237 // rsp[argc * 8] : argument 1 1240 // rsp[argc * 8] : argument 1
1238 // rsp[(argc + 1) * 8] : argument 0 = receiver 1241 // rsp[(argc + 1) * 8] : argument 0 = receiver
1239 // ----------------------------------- 1242 // -----------------------------------
1240 1243
1244 // Check if the name is a string.
1245 Label miss;
1246 __ JumpIfSmi(rcx, &miss);
1247 Condition cond = masm->IsObjectStringType(rcx, rax, rax);
1248 __ j(NegateCondition(cond), &miss);
1241 GenerateCallNormal(masm, argc); 1249 GenerateCallNormal(masm, argc);
1250 __ bind(&miss);
1242 GenerateMiss(masm, argc); 1251 GenerateMiss(masm, argc);
1243 } 1252 }
1244 1253
1245 1254
1246 void KeyedCallIC::GenerateMiss(MacroAssembler* masm, int argc) { 1255 void KeyedCallIC::GenerateMiss(MacroAssembler* masm, int argc) {
1247 // ----------- S t a t e ------------- 1256 // ----------- S t a t e -------------
1248 // rcx : function name 1257 // rcx : function name
1249 // rsp[0] : return address 1258 // rsp[0] : return address
1250 // rsp[8] : argument argc 1259 // rsp[8] : argument argc
1251 // rsp[16] : argument argc - 1 1260 // rsp[16] : argument argc - 1
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 } 1712 }
1704 1713
1705 void PatchInlinedSmiCode(Address address) { 1714 void PatchInlinedSmiCode(Address address) {
1706 UNIMPLEMENTED(); 1715 UNIMPLEMENTED();
1707 } 1716 }
1708 1717
1709 1718
1710 } } // namespace v8::internal 1719 } } // namespace v8::internal
1711 1720
1712 #endif // V8_TARGET_ARCH_X64 1721 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698