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

Side by Side Diff: src/ia32/code-stubs-ia32.h

Issue 3327001: ia32 StringAddStub: fast two character case. (Closed)
Patch Set: Better comment. Created 10 years, 3 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 | « no previous file | src/ia32/code-stubs-ia32.cc » ('j') | src/ia32/macro-assembler-ia32.cc » ('J')
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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // Generate code for copying characters using the rep movs instruction. 227 // Generate code for copying characters using the rep movs instruction.
228 // Copies ecx characters from esi to edi. Copying of overlapping regions is 228 // Copies ecx characters from esi to edi. Copying of overlapping regions is
229 // not supported. 229 // not supported.
230 static void GenerateCopyCharactersREP(MacroAssembler* masm, 230 static void GenerateCopyCharactersREP(MacroAssembler* masm,
231 Register dest, // Must be edi. 231 Register dest, // Must be edi.
232 Register src, // Must be esi. 232 Register src, // Must be esi.
233 Register count, // Must be ecx. 233 Register count, // Must be ecx.
234 Register scratch, // Neither of above. 234 Register scratch, // Neither of above.
235 bool ascii); 235 bool ascii);
236 236
237 // Probe the symbol table for a two character string. If the string is 237 // Probe the symbol table for a two character string. If the string
238 // not found by probing a jump to the label not_found is performed. This jump 238 // requires non-standard hashing a jump to the label not_probed is
239 // does not guarantee that the string is not in the symbol table. If the 239 // performed and registers c1 and c2 are preserved. If the string is
240 // string is found the code falls through with the string in register eax. 240 // not found by probing a jump to the label not_found is
241 // performed. This jump does not guarantee that the string is not in
Søren Thygesen Gjesse 2010/09/01 11:19:31 Maybe extend the comment to say that c1 and c2 are
Vitaly Repeshko 2010/09/01 17:21:51 Done.
242 // the symbol table. If the string is found the code falls through
243 // with the string in register eax.
241 static void GenerateTwoCharacterSymbolTableProbe(MacroAssembler* masm, 244 static void GenerateTwoCharacterSymbolTableProbe(MacroAssembler* masm,
242 Register c1, 245 Register c1,
243 Register c2, 246 Register c2,
244 Register scratch1, 247 Register scratch1,
245 Register scratch2, 248 Register scratch2,
246 Register scratch3, 249 Register scratch3,
250 Label* not_probed,
Søren Thygesen Gjesse 2010/09/01 11:19:31 How about renaming not_probed to not_found_c1_c2_p
Vitaly Repeshko 2010/09/01 17:21:51 I think having this described in the comment is en
247 Label* not_found); 251 Label* not_found);
248 252
249 // Generate string hash. 253 // Generate string hash.
250 static void GenerateHashInit(MacroAssembler* masm, 254 static void GenerateHashInit(MacroAssembler* masm,
251 Register hash, 255 Register hash,
252 Register character, 256 Register character,
253 Register scratch); 257 Register scratch);
254 static void GenerateHashAddCharacter(MacroAssembler* masm, 258 static void GenerateHashAddCharacter(MacroAssembler* masm,
255 Register hash, 259 Register hash,
256 Register character, 260 Register character,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 void Print() { 355 void Print() {
352 PrintF("NumberToStringStub\n"); 356 PrintF("NumberToStringStub\n");
353 } 357 }
354 #endif 358 #endif
355 }; 359 };
356 360
357 361
358 } } // namespace v8::internal 362 } } // namespace v8::internal
359 363
360 #endif // V8_IA32_CODE_STUBS_IA32_H_ 364 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | src/ia32/code-stubs-ia32.cc » ('j') | src/ia32/macro-assembler-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698