OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 6144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6155 // JSGlobalProxy's prototype must be a JSGlobalObject or null, | 6155 // JSGlobalProxy's prototype must be a JSGlobalObject or null, |
6156 // and the prototype is hidden. JSGlobalProxy always delegates | 6156 // and the prototype is hidden. JSGlobalProxy always delegates |
6157 // property accesses to its prototype if the prototype is not null. | 6157 // property accesses to its prototype if the prototype is not null. |
6158 // | 6158 // |
6159 // A JSGlobalProxy can be reinitialized which will preserve its identity. | 6159 // A JSGlobalProxy can be reinitialized which will preserve its identity. |
6160 // | 6160 // |
6161 // Accessing a JSGlobalProxy requires security check. | 6161 // Accessing a JSGlobalProxy requires security check. |
6162 | 6162 |
6163 class JSGlobalProxy : public JSObject { | 6163 class JSGlobalProxy : public JSObject { |
6164 public: | 6164 public: |
6165 // [context]: the owner native context of this global proxy object. | 6165 // [native_context]: the owner native context of this global proxy object. |
6166 // It is null value if this object is not used by any context. | 6166 // It is null value if this object is not used by any context. |
6167 DECL_ACCESSORS(context, Object) | 6167 DECL_ACCESSORS(native_context, Object) |
6168 | 6168 |
6169 // Casting. | 6169 // Casting. |
6170 static inline JSGlobalProxy* cast(Object* obj); | 6170 static inline JSGlobalProxy* cast(Object* obj); |
6171 | 6171 |
6172 // Dispatched behavior. | 6172 // Dispatched behavior. |
6173 #ifdef OBJECT_PRINT | 6173 #ifdef OBJECT_PRINT |
6174 inline void JSGlobalProxyPrint() { | 6174 inline void JSGlobalProxyPrint() { |
6175 JSGlobalProxyPrint(stdout); | 6175 JSGlobalProxyPrint(stdout); |
6176 } | 6176 } |
6177 void JSGlobalProxyPrint(FILE* out); | 6177 void JSGlobalProxyPrint(FILE* out); |
6178 #endif | 6178 #endif |
6179 #ifdef DEBUG | 6179 #ifdef DEBUG |
6180 void JSGlobalProxyVerify(); | 6180 void JSGlobalProxyVerify(); |
6181 #endif | 6181 #endif |
6182 | 6182 |
6183 // Layout description. | 6183 // Layout description. |
6184 static const int kContextOffset = JSObject::kHeaderSize; | 6184 static const int kNativeContextOffset = JSObject::kHeaderSize; |
6185 static const int kSize = kContextOffset + kPointerSize; | 6185 static const int kSize = kNativeContextOffset + kPointerSize; |
6186 | 6186 |
6187 private: | 6187 private: |
6188 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); | 6188 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); |
6189 }; | 6189 }; |
6190 | 6190 |
6191 | 6191 |
6192 // Forward declaration. | 6192 // Forward declaration. |
6193 class JSBuiltinsObject; | 6193 class JSBuiltinsObject; |
6194 | 6194 |
6195 // Common super class for JavaScript global objects and the special | 6195 // Common super class for JavaScript global objects and the special |
(...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8915 } else { | 8915 } else { |
8916 value &= ~(1 << bit_position); | 8916 value &= ~(1 << bit_position); |
8917 } | 8917 } |
8918 return value; | 8918 return value; |
8919 } | 8919 } |
8920 }; | 8920 }; |
8921 | 8921 |
8922 } } // namespace v8::internal | 8922 } } // namespace v8::internal |
8923 | 8923 |
8924 #endif // V8_OBJECTS_H_ | 8924 #endif // V8_OBJECTS_H_ |
OLD | NEW |