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

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

Issue 6928020: Faster string equals in generated code. (Closed)
Patch Set: Created 9 years, 7 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
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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 private: 365 private:
366 Major MajorKey() { return SubString; } 366 Major MajorKey() { return SubString; }
367 int MinorKey() { return 0; } 367 int MinorKey() { return 0; }
368 368
369 void Generate(MacroAssembler* masm); 369 void Generate(MacroAssembler* masm);
370 }; 370 };
371 371
372 372
373 class StringCompareStub: public CodeStub { 373 class StringCompareStub: public CodeStub {
374 public: 374 public:
375 explicit StringCompareStub() { 375 StringCompareStub() { }
376 }
377 376
378 // Compare two flat ascii strings and returns result in eax after popping two 377 // Compares two flat ASCII strings and returns result in eax.
379 // arguments from the stack.
380 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm, 378 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm,
381 Register left, 379 Register left,
382 Register right, 380 Register right,
383 Register scratch1, 381 Register scratch1,
384 Register scratch2, 382 Register scratch2,
385 Register scratch3); 383 Register scratch3);
386 384
385 // Compares two flat ASCII strings for equality and returns result
386 // in eax.
387 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm,
388 Register left,
389 Register right,
390 Register scratch1,
391 Register scratch2);
392
387 private: 393 private:
388 Major MajorKey() { return StringCompare; } 394 Major MajorKey() { return StringCompare; }
389 int MinorKey() { return 0; } 395 int MinorKey() { return 0; }
390 396
391 void Generate(MacroAssembler* masm); 397 void Generate(MacroAssembler* masm);
392 }; 398 };
393 399
394 400
395 class NumberToStringStub: public CodeStub { 401 class NumberToStringStub: public CodeStub {
396 public: 402 public:
(...skipping 23 matching lines...) Expand all
420 #ifdef DEBUG 426 #ifdef DEBUG
421 void Print() { 427 void Print() {
422 PrintF("NumberToStringStub\n"); 428 PrintF("NumberToStringStub\n");
423 } 429 }
424 #endif 430 #endif
425 }; 431 };
426 432
427 } } // namespace v8::internal 433 } } // namespace v8::internal
428 434
429 #endif // V8_IA32_CODE_STUBS_IA32_H_ 435 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698