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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm/code-stubs-arm.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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 // Compares two flat ASCII strings for equality and returns result 339 // Compares two flat ASCII strings for equality and returns result
340 // in r0. 340 // in r0.
341 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm, 341 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm,
342 Register left, 342 Register left,
343 Register right, 343 Register right,
344 Register scratch1, 344 Register scratch1,
345 Register scratch2, 345 Register scratch2,
346 Register scratch3); 346 Register scratch3);
347 347
348 private: 348 private:
349 Major MajorKey() { return StringCompare; } 349 virtual Major MajorKey() { return StringCompare; }
350 int MinorKey() { return 0; } 350 virtual int MinorKey() { return 0; }
351 virtual void Generate(MacroAssembler* masm);
351 352
352 void Generate(MacroAssembler* masm); 353 static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm,
354 Register left,
355 Register right,
356 Register length,
357 Register scratch1,
358 Register scratch2,
359 Label* chars_not_equal);
353 }; 360 };
354 361
355 362
356 // This stub can convert a signed int32 to a heap number (double). It does 363 // This stub can convert a signed int32 to a heap number (double). It does
357 // not work for int32s that are in Smi range! No GC occurs during this stub 364 // not work for int32s that are in Smi range! No GC occurs during this stub
358 // so you don't have to set up the frame. 365 // so you don't have to set up the frame.
359 class WriteInt32ToHeapNumberStub : public CodeStub { 366 class WriteInt32ToHeapNumberStub : public CodeStub {
360 public: 367 public:
361 WriteInt32ToHeapNumberStub(Register the_int, 368 WriteInt32ToHeapNumberStub(Register the_int,
362 Register the_heap_number, 369 Register the_heap_number,
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 Register heap_number_map, 608 Register heap_number_map,
602 Register scratch1, 609 Register scratch1,
603 Register scratch2, 610 Register scratch2,
604 Label* not_number); 611 Label* not_number);
605 }; 612 };
606 613
607 614
608 } } // namespace v8::internal 615 } } // namespace v8::internal
609 616
610 #endif // V8_ARM_CODE_STUBS_ARM_H_ 617 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698