| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 8486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8497 // It is null value if this object is not used by any context. | 8497 // It is null value if this object is not used by any context. |
| 8498 DECL_ACCESSORS(native_context, Object) | 8498 DECL_ACCESSORS(native_context, Object) |
| 8499 | 8499 |
| 8500 // [hash]: The hash code property (undefined if not initialized yet). | 8500 // [hash]: The hash code property (undefined if not initialized yet). |
| 8501 DECL_ACCESSORS(hash, Object) | 8501 DECL_ACCESSORS(hash, Object) |
| 8502 | 8502 |
| 8503 DECLARE_CAST(JSGlobalProxy) | 8503 DECLARE_CAST(JSGlobalProxy) |
| 8504 | 8504 |
| 8505 inline bool IsDetachedFrom(JSGlobalObject* global) const; | 8505 inline bool IsDetachedFrom(JSGlobalObject* global) const; |
| 8506 | 8506 |
| 8507 static int SizeWithInternalFields(int internal_field_count); |
| 8508 |
| 8507 // Dispatched behavior. | 8509 // Dispatched behavior. |
| 8508 DECLARE_PRINTER(JSGlobalProxy) | 8510 DECLARE_PRINTER(JSGlobalProxy) |
| 8509 DECLARE_VERIFIER(JSGlobalProxy) | 8511 DECLARE_VERIFIER(JSGlobalProxy) |
| 8510 | 8512 |
| 8511 // Layout description. | 8513 // Layout description. |
| 8512 static const int kNativeContextOffset = JSObject::kHeaderSize; | 8514 static const int kNativeContextOffset = JSObject::kHeaderSize; |
| 8513 static const int kHashOffset = kNativeContextOffset + kPointerSize; | 8515 static const int kHashOffset = kNativeContextOffset + kPointerSize; |
| 8514 static const int kSize = kHashOffset + kPointerSize; | 8516 static const int kSize = kHashOffset + kPointerSize; |
| 8515 static const int kSizeWithInternalFields = | |
| 8516 kSize + v8::Context::kProxyInternalFieldCount * kPointerSize; | |
| 8517 | 8517 |
| 8518 private: | 8518 private: |
| 8519 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); | 8519 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); |
| 8520 }; | 8520 }; |
| 8521 | 8521 |
| 8522 | 8522 |
| 8523 // JavaScript global object. | 8523 // JavaScript global object. |
| 8524 class JSGlobalObject : public JSObject { | 8524 class JSGlobalObject : public JSObject { |
| 8525 public: | 8525 public: |
| 8526 // [native context]: the natives corresponding to this global object. | 8526 // [native context]: the natives corresponding to this global object. |
| (...skipping 3242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11769 } | 11769 } |
| 11770 return value; | 11770 return value; |
| 11771 } | 11771 } |
| 11772 }; | 11772 }; |
| 11773 | 11773 |
| 11774 | 11774 |
| 11775 } // NOLINT, false-positive due to second-order macros. | 11775 } // NOLINT, false-positive due to second-order macros. |
| 11776 } // NOLINT, false-positive due to second-order macros. | 11776 } // NOLINT, false-positive due to second-order macros. |
| 11777 | 11777 |
| 11778 #endif // V8_OBJECTS_H_ | 11778 #endif // V8_OBJECTS_H_ |
| OLD | NEW |