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

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

Issue 527933002: Unify some PlatformCodeStubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2619 Isolate* isolate); 2619 Isolate* isolate);
2620 2620
2621 virtual Major MajorKey() const OVERRIDE { return ProfileEntryHook; } 2621 virtual Major MajorKey() const OVERRIDE { return ProfileEntryHook; }
2622 2622
2623 void Generate(MacroAssembler* masm); 2623 void Generate(MacroAssembler* masm);
2624 2624
2625 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2625 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2626 }; 2626 };
2627 2627
2628 2628
2629 class StoreBufferOverflowStub : public PlatformCodeStub {
2630 public:
2631 StoreBufferOverflowStub(Isolate* isolate, SaveFPRegsMode save_fp)
2632 : PlatformCodeStub(isolate) {
2633 minor_key_ = SaveDoublesBits::encode(save_fp == kSaveFPRegs);
2634 }
2635
2636 void Generate(MacroAssembler* masm);
2637
2638 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
2639 virtual bool SometimesSetsUpAFrame() { return false; }
2640
2641 private:
2642 Major MajorKey() const OVERRIDE { return StoreBufferOverflow; }
2643
2644 bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); }
2645
2646 class SaveDoublesBits : public BitField<bool, 0, 1> {};
2647
2648 DISALLOW_COPY_AND_ASSIGN(StoreBufferOverflowStub);
2649 };
2650
2651
2652 class SubStringStub : public PlatformCodeStub {
2653 public:
2654 explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
2655
2656 private:
2657 Major MajorKey() const OVERRIDE { return SubString; }
2658
2659 void Generate(MacroAssembler* masm);
2660
2661 DISALLOW_COPY_AND_ASSIGN(SubStringStub);
2662 };
2663
2664
2665 class StringCompareStub : public PlatformCodeStub {
2666 public:
2667 explicit StringCompareStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
2668
2669 private:
2670 virtual Major MajorKey() const { return StringCompare; }
2671
2672 virtual void Generate(MacroAssembler* masm);
2673
2674 DISALLOW_COPY_AND_ASSIGN(StringCompareStub);
2675 };
2629 } } // namespace v8::internal 2676 } } // namespace v8::internal
2630 2677
2631 #endif // V8_CODE_STUBS_H_ 2678 #endif // V8_CODE_STUBS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698