Chromium Code Reviews| 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 SizeFor(int internal_field_count) { | |
|
jochen (gone - plz use gerrit)
2016/11/04 08:06:23
can you move the body of this method to objects-in
dcheng
2016/11/04 09:27:19
Done.
| |
| 8508 return kHeaderSize + internal_field_count * kPointerSize; | |
| 8509 } | |
| 8510 | |
| 8507 // Dispatched behavior. | 8511 // Dispatched behavior. |
| 8508 DECLARE_PRINTER(JSGlobalProxy) | 8512 DECLARE_PRINTER(JSGlobalProxy) |
| 8509 DECLARE_VERIFIER(JSGlobalProxy) | 8513 DECLARE_VERIFIER(JSGlobalProxy) |
| 8510 | 8514 |
| 8511 // Layout description. | 8515 // Layout description. |
| 8512 static const int kNativeContextOffset = JSObject::kHeaderSize; | 8516 static const int kNativeContextOffset = JSObject::kHeaderSize; |
| 8513 static const int kHashOffset = kNativeContextOffset + kPointerSize; | 8517 static const int kHashOffset = kNativeContextOffset + kPointerSize; |
| 8514 static const int kSize = kHashOffset + kPointerSize; | 8518 static const int kHeaderSize = kHashOffset + kPointerSize; |
|
jochen (gone - plz use gerrit)
2016/11/04 08:06:23
kHeaderSize would usually not contain any of the d
dcheng
2016/11/04 09:27:19
Done.
| |
| 8515 static const int kSizeWithInternalFields = | |
| 8516 kSize + v8::Context::kProxyInternalFieldCount * kPointerSize; | |
| 8517 | 8519 |
| 8518 private: | 8520 private: |
| 8519 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); | 8521 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); |
| 8520 }; | 8522 }; |
| 8521 | 8523 |
| 8522 | 8524 |
| 8523 // JavaScript global object. | 8525 // JavaScript global object. |
| 8524 class JSGlobalObject : public JSObject { | 8526 class JSGlobalObject : public JSObject { |
| 8525 public: | 8527 public: |
| 8526 // [native context]: the natives corresponding to this global object. | 8528 // [native context]: the natives corresponding to this global object. |
| (...skipping 3242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 11769 } | 11771 } |
| 11770 return value; | 11772 return value; |
| 11771 } | 11773 } |
| 11772 }; | 11774 }; |
| 11773 | 11775 |
| 11774 | 11776 |
| 11775 } // NOLINT, false-positive due to second-order macros. | 11777 } // NOLINT, false-positive due to second-order macros. |
| 11776 } // NOLINT, false-positive due to second-order macros. | 11778 } // NOLINT, false-positive due to second-order macros. |
| 11777 | 11779 |
| 11778 #endif // V8_OBJECTS_H_ | 11780 #endif // V8_OBJECTS_H_ |
| OLD | NEW |