OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 public: | 880 public: |
881 // Type testing. | 881 // Type testing. |
882 bool IsObject() { return true; } | 882 bool IsObject() { return true; } |
883 | 883 |
884 #define IS_TYPE_FUNCTION_DECL(type_) inline bool Is##type_(); | 884 #define IS_TYPE_FUNCTION_DECL(type_) inline bool Is##type_(); |
885 OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) | 885 OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
886 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) | 886 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
887 #undef IS_TYPE_FUNCTION_DECL | 887 #undef IS_TYPE_FUNCTION_DECL |
888 | 888 |
889 inline bool IsFixedArrayBase(); | 889 inline bool IsFixedArrayBase(); |
| 890 inline bool IsExternal(); |
890 | 891 |
891 // Returns true if this object is an instance of the specified | 892 // Returns true if this object is an instance of the specified |
892 // function template. | 893 // function template. |
893 inline bool IsInstanceOf(FunctionTemplateInfo* type); | 894 inline bool IsInstanceOf(FunctionTemplateInfo* type); |
894 | 895 |
895 inline bool IsStruct(); | 896 inline bool IsStruct(); |
896 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name(); | 897 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name(); |
897 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) | 898 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) |
898 #undef DECLARE_STRUCT_PREDICATE | 899 #undef DECLARE_STRUCT_PREDICATE |
899 | 900 |
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2403 Object* value); | 2404 Object* value); |
2404 | 2405 |
2405 // Set operation on FixedArray without incremental write barrier. Can | 2406 // Set operation on FixedArray without incremental write barrier. Can |
2406 // only be used if the object is guaranteed to be white (whiteness witness | 2407 // only be used if the object is guaranteed to be white (whiteness witness |
2407 // is present). | 2408 // is present). |
2408 static inline void NoIncrementalWriteBarrierSet(FixedArray* array, | 2409 static inline void NoIncrementalWriteBarrierSet(FixedArray* array, |
2409 int index, | 2410 int index, |
2410 Object* value); | 2411 Object* value); |
2411 | 2412 |
2412 private: | 2413 private: |
| 2414 STATIC_CHECK(kHeaderSize == Internals::kFixedArrayHeaderSize); |
| 2415 |
2413 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); | 2416 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); |
2414 }; | 2417 }; |
2415 | 2418 |
2416 | 2419 |
2417 // FixedDoubleArray describes fixed-sized arrays with element type double. | 2420 // FixedDoubleArray describes fixed-sized arrays with element type double. |
2418 class FixedDoubleArray: public FixedArrayBase { | 2421 class FixedDoubleArray: public FixedArrayBase { |
2419 public: | 2422 public: |
2420 // Setter and getter for elements. | 2423 // Setter and getter for elements. |
2421 inline double get_scalar(int index); | 2424 inline double get_scalar(int index); |
2422 inline int64_t get_representation(int index); | 2425 inline int64_t get_representation(int index); |
(...skipping 6532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8955 } else { | 8958 } else { |
8956 value &= ~(1 << bit_position); | 8959 value &= ~(1 << bit_position); |
8957 } | 8960 } |
8958 return value; | 8961 return value; |
8959 } | 8962 } |
8960 }; | 8963 }; |
8961 | 8964 |
8962 } } // namespace v8::internal | 8965 } } // namespace v8::internal |
8963 | 8966 |
8964 #endif // V8_OBJECTS_H_ | 8967 #endif // V8_OBJECTS_H_ |
OLD | NEW |