OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 private: | 853 private: |
854 MacroAssembler* masm_; | 854 MacroAssembler* masm_; |
855 bool previous_allow_; | 855 bool previous_allow_; |
856 | 856 |
857 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); | 857 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); |
858 }; | 858 }; |
859 | 859 |
860 | 860 |
861 class KeyedLoadElementStub : public CodeStub { | 861 class KeyedLoadElementStub : public CodeStub { |
862 public: | 862 public: |
863 explicit KeyedLoadElementStub(JSObject::ElementsKind elements_kind) | 863 explicit KeyedLoadElementStub(ElementsKind elements_kind) |
864 : elements_kind_(elements_kind) | 864 : elements_kind_(elements_kind) |
865 { } | 865 { } |
866 | 866 |
867 Major MajorKey() { return KeyedLoadElement; } | 867 Major MajorKey() { return KeyedLoadElement; } |
868 int MinorKey() { return elements_kind_; } | 868 int MinorKey() { return elements_kind_; } |
869 | 869 |
870 void Generate(MacroAssembler* masm); | 870 void Generate(MacroAssembler* masm); |
871 | 871 |
872 private: | 872 private: |
873 JSObject::ElementsKind elements_kind_; | 873 ElementsKind elements_kind_; |
874 | 874 |
875 DISALLOW_COPY_AND_ASSIGN(KeyedLoadElementStub); | 875 DISALLOW_COPY_AND_ASSIGN(KeyedLoadElementStub); |
876 }; | 876 }; |
877 | 877 |
878 | 878 |
879 class KeyedStoreElementStub : public CodeStub { | 879 class KeyedStoreElementStub : public CodeStub { |
880 public: | 880 public: |
881 KeyedStoreElementStub(bool is_js_array, | 881 KeyedStoreElementStub(bool is_js_array, |
882 JSObject::ElementsKind elements_kind) | 882 ElementsKind elements_kind) |
883 : is_js_array_(is_js_array), | 883 : is_js_array_(is_js_array), |
884 elements_kind_(elements_kind) { } | 884 elements_kind_(elements_kind) { } |
885 | 885 |
886 Major MajorKey() { return KeyedStoreElement; } | 886 Major MajorKey() { return KeyedStoreElement; } |
887 int MinorKey() { | 887 int MinorKey() { |
888 return (is_js_array_ ? 0 : JSObject::kElementsKindCount) + elements_kind_; | 888 return (is_js_array_ ? 0 : kElementsKindCount) + elements_kind_; |
889 } | 889 } |
890 | 890 |
891 void Generate(MacroAssembler* masm); | 891 void Generate(MacroAssembler* masm); |
892 | 892 |
893 private: | 893 private: |
894 bool is_js_array_; | 894 bool is_js_array_; |
895 JSObject::ElementsKind elements_kind_; | 895 ElementsKind elements_kind_; |
896 | 896 |
897 DISALLOW_COPY_AND_ASSIGN(KeyedStoreElementStub); | 897 DISALLOW_COPY_AND_ASSIGN(KeyedStoreElementStub); |
898 }; | 898 }; |
899 | 899 |
900 | 900 |
901 class ToBooleanStub: public CodeStub { | 901 class ToBooleanStub: public CodeStub { |
902 public: | 902 public: |
903 enum Type { | 903 enum Type { |
904 UNDEFINED, | 904 UNDEFINED, |
905 BOOLEAN, | 905 BOOLEAN, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 bool result); | 958 bool result); |
959 void GenerateTypeTransition(MacroAssembler* masm); | 959 void GenerateTypeTransition(MacroAssembler* masm); |
960 | 960 |
961 Register tos_; | 961 Register tos_; |
962 Types types_; | 962 Types types_; |
963 }; | 963 }; |
964 | 964 |
965 } } // namespace v8::internal | 965 } } // namespace v8::internal |
966 | 966 |
967 #endif // V8_CODE_STUBS_H_ | 967 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |