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

Side by Side Diff: src/arm/code-stubs-arm.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
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | src/ia32/code-stubs-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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 void Generate(MacroAssembler* masm); 321 void Generate(MacroAssembler* masm);
322 }; 322 };
323 323
324 324
325 325
326 class StringCompareStub: public CodeStub { 326 class StringCompareStub: public CodeStub {
327 public: 327 public:
328 StringCompareStub() { } 328 StringCompareStub() { }
329 329
330 // Compare two flat ASCII strings and returns result in r0. 330 // Compares two flat ASCII strings and returns result in r0.
331 // Does not use the stack.
332 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm, 331 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm,
333 Register left, 332 Register left,
334 Register right, 333 Register right,
335 Register scratch1, 334 Register scratch1,
336 Register scratch2, 335 Register scratch2,
337 Register scratch3, 336 Register scratch3,
338 Register scratch4); 337 Register scratch4);
339 338
339 // Compares two flat ASCII strings for equality and returns result
340 // in r0.
341 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm,
342 Register left,
343 Register right,
344 Register scratch1,
345 Register scratch2,
346 Register scratch3);
347
340 private: 348 private:
341 Major MajorKey() { return StringCompare; } 349 Major MajorKey() { return StringCompare; }
342 int MinorKey() { return 0; } 350 int MinorKey() { return 0; }
343 351
344 void Generate(MacroAssembler* masm); 352 void Generate(MacroAssembler* masm);
345 }; 353 };
346 354
347 355
348 // This stub can convert a signed int32 to a heap number (double). It does 356 // This stub can convert a signed int32 to a heap number (double). It does
349 // not work for int32s that are in Smi range! No GC occurs during this stub 357 // not work for int32s that are in Smi range! No GC occurs during this stub
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 Register heap_number_map, 601 Register heap_number_map,
594 Register scratch1, 602 Register scratch1,
595 Register scratch2, 603 Register scratch2,
596 Label* not_number); 604 Label* not_number);
597 }; 605 };
598 606
599 607
600 } } // namespace v8::internal 608 } } // namespace v8::internal
601 609
602 #endif // V8_ARM_CODE_STUBS_ARM_H_ 610 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | src/ia32/code-stubs-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698