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_H_ | 5 #ifndef V8_RUNTIME_H_ |
6 #define V8_RUNTIME_H_ | 6 #define V8_RUNTIME_H_ |
7 | 7 |
8 #include "allocation.h" | 8 #include "allocation.h" |
9 #include "zone.h" | 9 #include "zone.h" |
10 | 10 |
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 enum TypedArrayId { | 858 enum TypedArrayId { |
859 // arrayIds below should be synchromized with typedarray.js natives. | 859 // arrayIds below should be synchromized with typedarray.js natives. |
860 ARRAY_ID_UINT8 = 1, | 860 ARRAY_ID_UINT8 = 1, |
861 ARRAY_ID_INT8 = 2, | 861 ARRAY_ID_INT8 = 2, |
862 ARRAY_ID_UINT16 = 3, | 862 ARRAY_ID_UINT16 = 3, |
863 ARRAY_ID_INT16 = 4, | 863 ARRAY_ID_INT16 = 4, |
864 ARRAY_ID_UINT32 = 5, | 864 ARRAY_ID_UINT32 = 5, |
865 ARRAY_ID_INT32 = 6, | 865 ARRAY_ID_INT32 = 6, |
866 ARRAY_ID_FLOAT32 = 7, | 866 ARRAY_ID_FLOAT32 = 7, |
867 ARRAY_ID_FLOAT64 = 8, | 867 ARRAY_ID_FLOAT64 = 8, |
868 ARRAY_ID_UINT8_CLAMPED = 9 | 868 ARRAY_ID_UINT8_CLAMPED = 9, |
| 869 |
| 870 ARRAY_ID_FIRST = ARRAY_ID_UINT8, |
| 871 ARRAY_ID_LAST = ARRAY_ID_UINT8_CLAMPED |
869 }; | 872 }; |
870 | 873 |
871 static void ArrayIdToTypeAndSize(int array_id, | 874 static void ArrayIdToTypeAndSize(int array_id, |
872 ExternalArrayType *type, | 875 ExternalArrayType *type, |
873 ElementsKind* external_elements_kind, | 876 ElementsKind* external_elements_kind, |
874 ElementsKind* fixed_elements_kind, | 877 ElementsKind* fixed_elements_kind, |
875 size_t *element_size); | 878 size_t *element_size); |
876 | 879 |
877 // Used in runtime.cc and hydrogen's VisitArrayLiteral. | 880 // Used in runtime.cc and hydrogen's VisitArrayLiteral. |
878 MUST_USE_RESULT static MaybeHandle<Object> CreateArrayLiteralBoilerplate( | 881 MUST_USE_RESULT static MaybeHandle<Object> CreateArrayLiteralBoilerplate( |
879 Isolate* isolate, | 882 Isolate* isolate, |
880 Handle<FixedArray> literals, | 883 Handle<FixedArray> literals, |
881 Handle<FixedArray> elements); | 884 Handle<FixedArray> elements); |
882 }; | 885 }; |
883 | 886 |
884 | 887 |
885 //--------------------------------------------------------------------------- | 888 //--------------------------------------------------------------------------- |
886 // Constants used by interface to runtime functions. | 889 // Constants used by interface to runtime functions. |
887 | 890 |
888 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; | 891 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; |
889 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; | 892 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; |
890 | 893 |
891 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 894 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; |
892 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 895 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; |
893 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; | 896 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; |
894 | 897 |
895 } } // namespace v8::internal | 898 } } // namespace v8::internal |
896 | 899 |
897 #endif // V8_RUNTIME_H_ | 900 #endif // V8_RUNTIME_H_ |
OLD | NEW |