OLD | NEW |
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_RUNTIME_RUNTIME_H_ | 5 #ifndef V8_RUNTIME_RUNTIME_H_ |
6 #define V8_RUNTIME_RUNTIME_H_ | 6 #define V8_RUNTIME_RUNTIME_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/objects.h" | 9 #include "src/objects.h" |
10 #include "src/zone.h" | 10 #include "src/zone.h" |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 F(DoubleLo, 1, 1) \ | 722 F(DoubleLo, 1, 1) \ |
723 F(MathSqrtRT, 1, 1) \ | 723 F(MathSqrtRT, 1, 1) \ |
724 F(MathLogRT, 1, 1) | 724 F(MathLogRT, 1, 1) |
725 | 725 |
726 | 726 |
727 //--------------------------------------------------------------------------- | 727 //--------------------------------------------------------------------------- |
728 // Runtime provides access to all C++ runtime functions. | 728 // Runtime provides access to all C++ runtime functions. |
729 | 729 |
730 class RuntimeState { | 730 class RuntimeState { |
731 public: | 731 public: |
732 StaticResource<ConsStringIteratorOp>* string_iterator() { | |
733 return &string_iterator_; | |
734 } | |
735 unibrow::Mapping<unibrow::ToUppercase, 128>* to_upper_mapping() { | 732 unibrow::Mapping<unibrow::ToUppercase, 128>* to_upper_mapping() { |
736 return &to_upper_mapping_; | 733 return &to_upper_mapping_; |
737 } | 734 } |
738 unibrow::Mapping<unibrow::ToLowercase, 128>* to_lower_mapping() { | 735 unibrow::Mapping<unibrow::ToLowercase, 128>* to_lower_mapping() { |
739 return &to_lower_mapping_; | 736 return &to_lower_mapping_; |
740 } | 737 } |
741 ConsStringIteratorOp* string_iterator_compare_x() { | |
742 return &string_iterator_compare_x_; | |
743 } | |
744 ConsStringIteratorOp* string_iterator_compare_y() { | |
745 return &string_iterator_compare_y_; | |
746 } | |
747 ConsStringIteratorOp* string_locale_compare_it1() { | |
748 return &string_locale_compare_it1_; | |
749 } | |
750 ConsStringIteratorOp* string_locale_compare_it2() { | |
751 return &string_locale_compare_it2_; | |
752 } | |
753 | 738 |
754 private: | 739 private: |
755 RuntimeState() {} | 740 RuntimeState() {} |
756 // Non-reentrant string buffer for efficient general use in the runtime. | |
757 StaticResource<ConsStringIteratorOp> string_iterator_; | |
758 unibrow::Mapping<unibrow::ToUppercase, 128> to_upper_mapping_; | 741 unibrow::Mapping<unibrow::ToUppercase, 128> to_upper_mapping_; |
759 unibrow::Mapping<unibrow::ToLowercase, 128> to_lower_mapping_; | 742 unibrow::Mapping<unibrow::ToLowercase, 128> to_lower_mapping_; |
760 ConsStringIteratorOp string_iterator_compare_x_; | |
761 ConsStringIteratorOp string_iterator_compare_y_; | |
762 ConsStringIteratorOp string_locale_compare_it1_; | |
763 ConsStringIteratorOp string_locale_compare_it2_; | |
764 | 743 |
765 friend class Isolate; | 744 friend class Isolate; |
766 friend class Runtime; | 745 friend class Runtime; |
767 | 746 |
768 DISALLOW_COPY_AND_ASSIGN(RuntimeState); | 747 DISALLOW_COPY_AND_ASSIGN(RuntimeState); |
769 }; | 748 }; |
770 | 749 |
771 | 750 |
772 class JavaScriptFrameIterator; // Forward declaration. | 751 class JavaScriptFrameIterator; // Forward declaration. |
773 | 752 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 class AllocateTargetSpace : public BitField<AllocationSpace, 1, 3> {}; | 877 class AllocateTargetSpace : public BitField<AllocationSpace, 1, 3> {}; |
899 | 878 |
900 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; | 879 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; |
901 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; | 880 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; |
902 class DeclareGlobalsStrictMode : public BitField<StrictMode, 2, 1> {}; | 881 class DeclareGlobalsStrictMode : public BitField<StrictMode, 2, 1> {}; |
903 | 882 |
904 } // namespace internal | 883 } // namespace internal |
905 } // namespace v8 | 884 } // namespace v8 |
906 | 885 |
907 #endif // V8_RUNTIME_RUNTIME_H_ | 886 #endif // V8_RUNTIME_RUNTIME_H_ |
OLD | NEW |