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

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

Issue 6927044: Extract common code in string compare loops. (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
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 384
385 // Compares two flat ASCII strings for equality and returns result 385 // Compares two flat ASCII strings for equality and returns result
386 // in eax. 386 // in eax.
387 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm, 387 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm,
388 Register left, 388 Register left,
389 Register right, 389 Register right,
390 Register scratch1, 390 Register scratch1,
391 Register scratch2); 391 Register scratch2);
392 392
393 private: 393 private:
394 Major MajorKey() { return StringCompare; } 394 virtual Major MajorKey() { return StringCompare; }
395 int MinorKey() { return 0; } 395 virtual int MinorKey() { return 0; }
396 virtual void Generate(MacroAssembler* masm);
396 397
397 void Generate(MacroAssembler* masm); 398 static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm,
399 Register left,
400 Register right,
401 Register length,
402 Register scratch,
403 NearLabel* chars_not_equal);
398 }; 404 };
399 405
400 406
401 class NumberToStringStub: public CodeStub { 407 class NumberToStringStub: public CodeStub {
402 public: 408 public:
403 NumberToStringStub() { } 409 NumberToStringStub() { }
404 410
405 // Generate code to do a lookup in the number string cache. If the number in 411 // Generate code to do a lookup in the number string cache. If the number in
406 // the register object is found in the cache the generated code falls through 412 // the register object is found in the cache the generated code falls through
407 // with the result in the result register. The object and the result register 413 // with the result in the result register. The object and the result register
(...skipping 18 matching lines...) Expand all
426 #ifdef DEBUG 432 #ifdef DEBUG
427 void Print() { 433 void Print() {
428 PrintF("NumberToStringStub\n"); 434 PrintF("NumberToStringStub\n");
429 } 435 }
430 #endif 436 #endif
431 }; 437 };
432 438
433 } } // namespace v8::internal 439 } } // namespace v8::internal
434 440
435 #endif // V8_IA32_CODE_STUBS_IA32_H_ 441 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698