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

Side by Side Diff: src/objects.h

Issue 151146: Treat the builtins object like other global objects (with... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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/ic.cc ('k') | src/objects.cc » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3041 matching lines...) Expand 10 before | Expand all | Expand 10 after
3052 public: 3052 public:
3053 // [builtins]: the object holding the runtime routines written in JS. 3053 // [builtins]: the object holding the runtime routines written in JS.
3054 DECL_ACCESSORS(builtins, JSBuiltinsObject) 3054 DECL_ACCESSORS(builtins, JSBuiltinsObject)
3055 3055
3056 // [global context]: the global context corresponding to this global object. 3056 // [global context]: the global context corresponding to this global object.
3057 DECL_ACCESSORS(global_context, Context) 3057 DECL_ACCESSORS(global_context, Context)
3058 3058
3059 // [global receiver]: the global receiver object of the context 3059 // [global receiver]: the global receiver object of the context
3060 DECL_ACCESSORS(global_receiver, JSObject) 3060 DECL_ACCESSORS(global_receiver, JSObject)
3061 3061
3062 // Retrieve the property cell used to store a property.
3063 Object* GetPropertyCell(LookupResult* result);
3064
3062 // Casting. 3065 // Casting.
3063 static inline GlobalObject* cast(Object* obj); 3066 static inline GlobalObject* cast(Object* obj);
3064 3067
3065 // Layout description. 3068 // Layout description.
3066 static const int kBuiltinsOffset = JSObject::kHeaderSize; 3069 static const int kBuiltinsOffset = JSObject::kHeaderSize;
3067 static const int kGlobalContextOffset = kBuiltinsOffset + kPointerSize; 3070 static const int kGlobalContextOffset = kBuiltinsOffset + kPointerSize;
3068 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize; 3071 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize;
3069 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize; 3072 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize;
3070 3073
3071 private: 3074 private:
3072 friend class AGCCVersionRequiresThisClassToHaveAFriendSoHereItIs; 3075 friend class AGCCVersionRequiresThisClassToHaveAFriendSoHereItIs;
3073 3076
3074 DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalObject); 3077 DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalObject);
3075 }; 3078 };
3076 3079
3077 3080
3078 // JavaScript global object. 3081 // JavaScript global object.
3079 class JSGlobalObject: public GlobalObject { 3082 class JSGlobalObject: public GlobalObject {
3080 public: 3083 public:
3081 3084
3082 // Retrieve the property cell used to store a property.
3083 Object* GetPropertyCell(LookupResult* result);
3084
3085 // Casting. 3085 // Casting.
3086 static inline JSGlobalObject* cast(Object* obj); 3086 static inline JSGlobalObject* cast(Object* obj);
3087 3087
3088 // Dispatched behavior. 3088 // Dispatched behavior.
3089 #ifdef DEBUG 3089 #ifdef DEBUG
3090 void JSGlobalObjectPrint(); 3090 void JSGlobalObjectPrint();
3091 void JSGlobalObjectVerify(); 3091 void JSGlobalObjectVerify();
3092 #endif 3092 #endif
3093 3093
3094 // Layout description. 3094 // Layout description.
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
4515 } else { 4515 } else {
4516 value &= ~(1 << bit_position); 4516 value &= ~(1 << bit_position);
4517 } 4517 }
4518 return value; 4518 return value;
4519 } 4519 }
4520 }; 4520 };
4521 4521
4522 } } // namespace v8::internal 4522 } } // namespace v8::internal
4523 4523
4524 #endif // V8_OBJECTS_H_ 4524 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698