Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: src/objects.h

Issue 2475433008: Set global proxy internal field count based on the global object template. (Closed)
Patch Set: Address comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/factory.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698