OLD | NEW |
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 3222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3233 | 3233 |
3234 // [global context]: the global context corresponding to this global object. | 3234 // [global context]: the global context corresponding to this global object. |
3235 DECL_ACCESSORS(global_context, Context) | 3235 DECL_ACCESSORS(global_context, Context) |
3236 | 3236 |
3237 // [global receiver]: the global receiver object of the context | 3237 // [global receiver]: the global receiver object of the context |
3238 DECL_ACCESSORS(global_receiver, JSObject) | 3238 DECL_ACCESSORS(global_receiver, JSObject) |
3239 | 3239 |
3240 // Retrieve the property cell used to store a property. | 3240 // Retrieve the property cell used to store a property. |
3241 Object* GetPropertyCell(LookupResult* result); | 3241 Object* GetPropertyCell(LookupResult* result); |
3242 | 3242 |
| 3243 // Ensure that the global object has a cell for the given property name. |
| 3244 Object* EnsurePropertyCell(String* name); |
| 3245 |
3243 // Casting. | 3246 // Casting. |
3244 static inline GlobalObject* cast(Object* obj); | 3247 static inline GlobalObject* cast(Object* obj); |
3245 | 3248 |
3246 // Layout description. | 3249 // Layout description. |
3247 static const int kBuiltinsOffset = JSObject::kHeaderSize; | 3250 static const int kBuiltinsOffset = JSObject::kHeaderSize; |
3248 static const int kGlobalContextOffset = kBuiltinsOffset + kPointerSize; | 3251 static const int kGlobalContextOffset = kBuiltinsOffset + kPointerSize; |
3249 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize; | 3252 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize; |
3250 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize; | 3253 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize; |
3251 | 3254 |
3252 private: | 3255 private: |
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4723 } else { | 4726 } else { |
4724 value &= ~(1 << bit_position); | 4727 value &= ~(1 << bit_position); |
4725 } | 4728 } |
4726 return value; | 4729 return value; |
4727 } | 4730 } |
4728 }; | 4731 }; |
4729 | 4732 |
4730 } } // namespace v8::internal | 4733 } } // namespace v8::internal |
4731 | 4734 |
4732 #endif // V8_OBJECTS_H_ | 4735 #endif // V8_OBJECTS_H_ |
OLD | NEW |