| 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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 public: | 900 public: |
| 901 // Type testing. | 901 // Type testing. |
| 902 bool IsObject() { return true; } | 902 bool IsObject() { return true; } |
| 903 | 903 |
| 904 #define IS_TYPE_FUNCTION_DECL(type_) inline bool Is##type_(); | 904 #define IS_TYPE_FUNCTION_DECL(type_) inline bool Is##type_(); |
| 905 OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) | 905 OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
| 906 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) | 906 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
| 907 #undef IS_TYPE_FUNCTION_DECL | 907 #undef IS_TYPE_FUNCTION_DECL |
| 908 | 908 |
| 909 inline bool IsFixedArrayBase(); | 909 inline bool IsFixedArrayBase(); |
| 910 inline bool IsExternal(); |
| 910 | 911 |
| 911 // Returns true if this object is an instance of the specified | 912 // Returns true if this object is an instance of the specified |
| 912 // function template. | 913 // function template. |
| 913 inline bool IsInstanceOf(FunctionTemplateInfo* type); | 914 inline bool IsInstanceOf(FunctionTemplateInfo* type); |
| 914 | 915 |
| 915 inline bool IsStruct(); | 916 inline bool IsStruct(); |
| 916 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name(); | 917 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name(); |
| 917 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) | 918 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) |
| 918 #undef DECLARE_STRUCT_PREDICATE | 919 #undef DECLARE_STRUCT_PREDICATE |
| 919 | 920 |
| (...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2444 Object* value); | 2445 Object* value); |
| 2445 | 2446 |
| 2446 // Set operation on FixedArray without incremental write barrier. Can | 2447 // Set operation on FixedArray without incremental write barrier. Can |
| 2447 // only be used if the object is guaranteed to be white (whiteness witness | 2448 // only be used if the object is guaranteed to be white (whiteness witness |
| 2448 // is present). | 2449 // is present). |
| 2449 static inline void NoIncrementalWriteBarrierSet(FixedArray* array, | 2450 static inline void NoIncrementalWriteBarrierSet(FixedArray* array, |
| 2450 int index, | 2451 int index, |
| 2451 Object* value); | 2452 Object* value); |
| 2452 | 2453 |
| 2453 private: | 2454 private: |
| 2455 STATIC_CHECK(kHeaderSize == Internals::kFixedArrayHeaderSize); |
| 2456 |
| 2454 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); | 2457 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); |
| 2455 }; | 2458 }; |
| 2456 | 2459 |
| 2457 | 2460 |
| 2458 // FixedDoubleArray describes fixed-sized arrays with element type double. | 2461 // FixedDoubleArray describes fixed-sized arrays with element type double. |
| 2459 class FixedDoubleArray: public FixedArrayBase { | 2462 class FixedDoubleArray: public FixedArrayBase { |
| 2460 public: | 2463 public: |
| 2461 // Setter and getter for elements. | 2464 // Setter and getter for elements. |
| 2462 inline double get_scalar(int index); | 2465 inline double get_scalar(int index); |
| 2463 inline int64_t get_representation(int index); | 2466 inline int64_t get_representation(int index); |
| (...skipping 6569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9033 } else { | 9036 } else { |
| 9034 value &= ~(1 << bit_position); | 9037 value &= ~(1 << bit_position); |
| 9035 } | 9038 } |
| 9036 return value; | 9039 return value; |
| 9037 } | 9040 } |
| 9038 }; | 9041 }; |
| 9039 | 9042 |
| 9040 } } // namespace v8::internal | 9043 } } // namespace v8::internal |
| 9041 | 9044 |
| 9042 #endif // V8_OBJECTS_H_ | 9045 #endif // V8_OBJECTS_H_ |
| OLD | NEW |