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

Side by Side Diff: src/objects.h

Issue 352173006: Clean up the global object naming madness. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 5 months 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 | Annotate | Revision Log
« no previous file with comments | « src/isolate.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/builtins.h" 10 #include "src/builtins.h"
(...skipping 7582 matching lines...) Expand 10 before | Expand all | Expand 10 after
7593 // [prototype_or_initial_map]: 7593 // [prototype_or_initial_map]:
7594 DECL_ACCESSORS(prototype_or_initial_map, Object) 7594 DECL_ACCESSORS(prototype_or_initial_map, Object)
7595 7595
7596 // [shared]: The information about the function that 7596 // [shared]: The information about the function that
7597 // can be shared by instances. 7597 // can be shared by instances.
7598 DECL_ACCESSORS(shared, SharedFunctionInfo) 7598 DECL_ACCESSORS(shared, SharedFunctionInfo)
7599 7599
7600 // [context]: The context for this function. 7600 // [context]: The context for this function.
7601 inline Context* context(); 7601 inline Context* context();
7602 inline void set_context(Object* context); 7602 inline void set_context(Object* context);
7603 inline JSObject* global_proxy();
7603 7604
7604 // [code]: The generated code object for this function. Executed 7605 // [code]: The generated code object for this function. Executed
7605 // when the function is invoked, e.g. foo() or new foo(). See 7606 // when the function is invoked, e.g. foo() or new foo(). See
7606 // [[Call]] and [[Construct]] description in ECMA-262, section 7607 // [[Call]] and [[Construct]] description in ECMA-262, section
7607 // 8.6.2, page 27. 7608 // 8.6.2, page 27.
7608 inline Code* code(); 7609 inline Code* code();
7609 inline void set_code(Code* code); 7610 inline void set_code(Code* code);
7610 inline void set_code_no_write_barrier(Code* code); 7611 inline void set_code_no_write_barrier(Code* code);
7611 inline void ReplaceCode(Code* code); 7612 inline void ReplaceCode(Code* code);
7612 7613
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
7846 public: 7847 public:
7847 // [builtins]: the object holding the runtime routines written in JS. 7848 // [builtins]: the object holding the runtime routines written in JS.
7848 DECL_ACCESSORS(builtins, JSBuiltinsObject) 7849 DECL_ACCESSORS(builtins, JSBuiltinsObject)
7849 7850
7850 // [native context]: the natives corresponding to this global object. 7851 // [native context]: the natives corresponding to this global object.
7851 DECL_ACCESSORS(native_context, Context) 7852 DECL_ACCESSORS(native_context, Context)
7852 7853
7853 // [global context]: the most recent (i.e. innermost) global context. 7854 // [global context]: the most recent (i.e. innermost) global context.
7854 DECL_ACCESSORS(global_context, Context) 7855 DECL_ACCESSORS(global_context, Context)
7855 7856
7856 // [global receiver]: the global receiver object of the context 7857 // [global proxy]: the global proxy object of the context
7857 DECL_ACCESSORS(global_receiver, JSObject) 7858 DECL_ACCESSORS(global_proxy, JSObject)
7858 7859
7859 // Retrieve the property cell used to store a property. 7860 // Retrieve the property cell used to store a property.
7860 PropertyCell* GetPropertyCell(LookupResult* result); 7861 PropertyCell* GetPropertyCell(LookupResult* result);
7861 7862
7862 DECLARE_CAST(GlobalObject) 7863 DECLARE_CAST(GlobalObject)
7863 7864
7864 // Layout description. 7865 // Layout description.
7865 static const int kBuiltinsOffset = JSObject::kHeaderSize; 7866 static const int kBuiltinsOffset = JSObject::kHeaderSize;
7866 static const int kNativeContextOffset = kBuiltinsOffset + kPointerSize; 7867 static const int kNativeContextOffset = kBuiltinsOffset + kPointerSize;
7867 static const int kGlobalContextOffset = kNativeContextOffset + kPointerSize; 7868 static const int kGlobalContextOffset = kNativeContextOffset + kPointerSize;
7868 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize; 7869 static const int kGlobalProxyOffset = kGlobalContextOffset + kPointerSize;
7869 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize; 7870 static const int kHeaderSize = kGlobalProxyOffset + kPointerSize;
7870 7871
7871 private: 7872 private:
7872 DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalObject); 7873 DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalObject);
7873 }; 7874 };
7874 7875
7875 7876
7876 // JavaScript global object. 7877 // JavaScript global object.
7877 class JSGlobalObject: public GlobalObject { 7878 class JSGlobalObject: public GlobalObject {
7878 public: 7879 public:
7879 DECLARE_CAST(JSGlobalObject) 7880 DECLARE_CAST(JSGlobalObject)
(...skipping 3296 matching lines...) Expand 10 before | Expand all | Expand 10 after
11176 } else { 11177 } else {
11177 value &= ~(1 << bit_position); 11178 value &= ~(1 << bit_position);
11178 } 11179 }
11179 return value; 11180 return value;
11180 } 11181 }
11181 }; 11182 };
11182 11183
11183 } } // namespace v8::internal 11184 } } // namespace v8::internal
11184 11185
11185 #endif // V8_OBJECTS_H_ 11186 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698