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

Unified Diff: src/objects.h

Issue 1406113007: Merge GlobalObject with JSGlobalObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 0496530bf2a3ac86afb2c3fe963a17fff8841730..81bf4ccdf8c185ec7d4bac7331352b5de215dbb1 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -62,8 +62,7 @@
// - JSFunction
// - JSGeneratorObject
// - JSModule
-// - GlobalObject
-// - JSGlobalObject
+// - JSGlobalObject
// - JSGlobalProxy
// - JSValue
// - JSDate
@@ -849,7 +848,7 @@ class ConsString;
class ElementsAccessor;
class FixedArrayBase;
class FunctionLiteral;
-class GlobalObject;
+class JSGlobalObject;
class KeyAccumulator;
class LayoutDescriptor;
class LiteralsArray;
@@ -993,7 +992,6 @@ template <class C> inline bool Is(Object* obj);
V(PolymorphicCodeCacheHashTable) \
V(MapCache) \
V(Primitive) \
- V(GlobalObject) \
V(JSGlobalObject) \
V(JSGlobalProxy) \
V(UndetectableObject) \
@@ -5935,7 +5933,6 @@ class Map: public HeapObject {
inline bool IsJSGlobalProxyMap();
inline bool IsJSGlobalObjectMap();
inline bool IsJSTypedArrayMap();
- inline bool IsGlobalObjectMap();
inline bool CanOmitMapChecks();
@@ -7441,7 +7438,7 @@ class JSGlobalProxy : public JSObject {
DECLARE_CAST(JSGlobalProxy)
- inline bool IsDetachedFrom(GlobalObject* global) const;
+ inline bool IsDetachedFrom(JSGlobalObject* global) const;
// Dispatched behavior.
DECLARE_PRINTER(JSGlobalProxy)
@@ -7457,9 +7454,8 @@ class JSGlobalProxy : public JSObject {
};
-// Common super class for JavaScript global objects and the special
-// builtins global objects.
-class GlobalObject: public JSObject {
+// JavaScript global object.
+class JSGlobalObject : public JSObject {
public:
// [native context]: the natives corresponding to this global object.
DECL_ACCESSORS(native_context, Context)
@@ -7467,27 +7463,13 @@ class GlobalObject: public JSObject {
// [global proxy]: the global proxy object of the context
DECL_ACCESSORS(global_proxy, JSObject)
- DECLARE_CAST(GlobalObject)
- static void InvalidatePropertyCell(Handle<GlobalObject> object,
+ static void InvalidatePropertyCell(Handle<JSGlobalObject> object,
Handle<Name> name);
// Ensure that the global object has a cell for the given property name.
- static Handle<PropertyCell> EnsurePropertyCell(Handle<GlobalObject> global,
+ static Handle<PropertyCell> EnsurePropertyCell(Handle<JSGlobalObject> global,
Handle<Name> name);
- // Layout description.
- static const int kNativeContextOffset = JSObject::kHeaderSize;
- static const int kGlobalProxyOffset = kNativeContextOffset + kPointerSize;
- static const int kHeaderSize = kGlobalProxyOffset + kPointerSize;
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalObject);
-};
-
-
-// JavaScript global object.
-class JSGlobalObject: public GlobalObject {
- public:
DECLARE_CAST(JSGlobalObject)
inline bool IsDetached();
@@ -7497,7 +7479,10 @@ class JSGlobalObject: public GlobalObject {
DECLARE_VERIFIER(JSGlobalObject)
// Layout description.
- static const int kSize = GlobalObject::kHeaderSize;
+ static const int kNativeContextOffset = JSObject::kHeaderSize;
+ static const int kGlobalProxyOffset = kNativeContextOffset + kPointerSize;
+ static const int kHeaderSize = kGlobalProxyOffset + kPointerSize;
+ static const int kSize = kHeaderSize;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject);
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698