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

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

Issue 6960009: Version 3.3.5 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
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 | Annotate | Revision Log
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | 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 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 virtual Major MajorKey() { return StringCompare; }
342 int MinorKey() { return 0; } 350 virtual int MinorKey() { return 0; }
351 virtual void Generate(MacroAssembler* masm);
343 352
344 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);
345 }; 360 };
346 361
347 362
348 // 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
349 // 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
350 // so you don't have to set up the frame. 365 // so you don't have to set up the frame.
351 class WriteInt32ToHeapNumberStub : public CodeStub { 366 class WriteInt32ToHeapNumberStub : public CodeStub {
352 public: 367 public:
353 WriteInt32ToHeapNumberStub(Register the_int, 368 WriteInt32ToHeapNumberStub(Register the_int,
354 Register the_heap_number, 369 Register the_heap_number,
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 DwVfpRegister dst, 605 DwVfpRegister dst,
591 Register dst1, 606 Register dst1,
592 Register dst2, 607 Register dst2,
593 Register heap_number_map, 608 Register heap_number_map,
594 Register scratch1, 609 Register scratch1,
595 Register scratch2, 610 Register scratch2,
596 Label* not_number); 611 Label* not_number);
597 }; 612 };
598 613
599 614
615 class StringDictionaryLookupStub: public CodeStub {
616 public:
617 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP };
618
619 explicit StringDictionaryLookupStub(LookupMode mode) : mode_(mode) { }
620
621 void Generate(MacroAssembler* masm);
622
623 static void GenerateNegativeLookup(MacroAssembler* masm,
624 Label* miss,
625 Label* done,
626 Register receiver,
627 Register properties,
628 String* name,
629 Register scratch0) ;
630
631 static void GeneratePositiveLookup(MacroAssembler* masm,
632 Label* miss,
633 Label* done,
634 Register elements,
635 Register name,
636 Register r0,
637 Register r1);
638
639 private:
640 static const int kInlinedProbes = 4;
641 static const int kTotalProbes = 20;
642
643 static const int kCapacityOffset =
644 StringDictionary::kHeaderSize +
645 StringDictionary::kCapacityIndex * kPointerSize;
646
647 static const int kElementsStartOffset =
648 StringDictionary::kHeaderSize +
649 StringDictionary::kElementsStartIndex * kPointerSize;
650
651
652 #ifdef DEBUG
653 void Print() {
654 PrintF("StringDictionaryLookupStub\n");
655 }
656 #endif
657
658 Major MajorKey() { return StringDictionaryNegativeLookup; }
659
660 int MinorKey() {
661 return LookupModeBits::encode(mode_);
662 }
663
664 class LookupModeBits: public BitField<LookupMode, 0, 1> {};
665
666 LookupMode mode_;
667 };
668
669
600 } } // namespace v8::internal 670 } } // namespace v8::internal
601 671
602 #endif // V8_ARM_CODE_STUBS_ARM_H_ 672 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698