| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // - HeapObject (superclass for everything allocated in the heap) | 55 // - HeapObject (superclass for everything allocated in the heap) |
| 56 // - JSReceiver (suitable for property access) | 56 // - JSReceiver (suitable for property access) |
| 57 // - JSObject | 57 // - JSObject |
| 58 // - JSArray | 58 // - JSArray |
| 59 // - JSArrayBuffer | 59 // - JSArrayBuffer |
| 60 // - JSSet | 60 // - JSSet |
| 61 // - JSMap | 61 // - JSMap |
| 62 // - JSWeakMap | 62 // - JSWeakMap |
| 63 // - JSRegExp | 63 // - JSRegExp |
| 64 // - JSFunction | 64 // - JSFunction |
| 65 // - JSGeneratorObject |
| 65 // - JSModule | 66 // - JSModule |
| 66 // - GlobalObject | 67 // - GlobalObject |
| 67 // - JSGlobalObject | 68 // - JSGlobalObject |
| 68 // - JSBuiltinsObject | 69 // - JSBuiltinsObject |
| 69 // - JSGlobalProxy | 70 // - JSGlobalProxy |
| 70 // - JSValue | 71 // - JSValue |
| 71 // - JSDate | 72 // - JSDate |
| 72 // - JSMessageObject | 73 // - JSMessageObject |
| 73 // - JSProxy | 74 // - JSProxy |
| 74 // - JSFunctionProxy | 75 // - JSFunctionProxy |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 V(FIXED_ARRAY_TYPE) \ | 389 V(FIXED_ARRAY_TYPE) \ |
| 389 V(FIXED_DOUBLE_ARRAY_TYPE) \ | 390 V(FIXED_DOUBLE_ARRAY_TYPE) \ |
| 390 V(SHARED_FUNCTION_INFO_TYPE) \ | 391 V(SHARED_FUNCTION_INFO_TYPE) \ |
| 391 \ | 392 \ |
| 392 V(JS_MESSAGE_OBJECT_TYPE) \ | 393 V(JS_MESSAGE_OBJECT_TYPE) \ |
| 393 \ | 394 \ |
| 394 V(JS_VALUE_TYPE) \ | 395 V(JS_VALUE_TYPE) \ |
| 395 V(JS_DATE_TYPE) \ | 396 V(JS_DATE_TYPE) \ |
| 396 V(JS_OBJECT_TYPE) \ | 397 V(JS_OBJECT_TYPE) \ |
| 397 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \ | 398 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \ |
| 399 V(JS_GENERATOR_OBJECT_TYPE) \ |
| 398 V(JS_MODULE_TYPE) \ | 400 V(JS_MODULE_TYPE) \ |
| 399 V(JS_GLOBAL_OBJECT_TYPE) \ | 401 V(JS_GLOBAL_OBJECT_TYPE) \ |
| 400 V(JS_BUILTINS_OBJECT_TYPE) \ | 402 V(JS_BUILTINS_OBJECT_TYPE) \ |
| 401 V(JS_GLOBAL_PROXY_TYPE) \ | 403 V(JS_GLOBAL_PROXY_TYPE) \ |
| 402 V(JS_ARRAY_TYPE) \ | 404 V(JS_ARRAY_TYPE) \ |
| 403 V(JS_ARRAY_BUFFER_TYPE) \ | 405 V(JS_ARRAY_BUFFER_TYPE) \ |
| 404 V(JS_PROXY_TYPE) \ | 406 V(JS_PROXY_TYPE) \ |
| 405 V(JS_WEAK_MAP_TYPE) \ | 407 V(JS_WEAK_MAP_TYPE) \ |
| 406 V(JS_REGEXP_TYPE) \ | 408 V(JS_REGEXP_TYPE) \ |
| 407 \ | 409 \ |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 // the two forms of function. This organization enables using the same | 721 // the two forms of function. This organization enables using the same |
| 720 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the | 722 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the |
| 721 // NONCALLABLE_JS_OBJECT range. | 723 // NONCALLABLE_JS_OBJECT range. |
| 722 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE | 724 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE |
| 723 JS_PROXY_TYPE, // LAST_JS_PROXY_TYPE | 725 JS_PROXY_TYPE, // LAST_JS_PROXY_TYPE |
| 724 | 726 |
| 725 JS_VALUE_TYPE, // FIRST_JS_OBJECT_TYPE | 727 JS_VALUE_TYPE, // FIRST_JS_OBJECT_TYPE |
| 726 JS_DATE_TYPE, | 728 JS_DATE_TYPE, |
| 727 JS_OBJECT_TYPE, | 729 JS_OBJECT_TYPE, |
| 728 JS_CONTEXT_EXTENSION_OBJECT_TYPE, | 730 JS_CONTEXT_EXTENSION_OBJECT_TYPE, |
| 731 JS_GENERATOR_OBJECT_TYPE, |
| 729 JS_MODULE_TYPE, | 732 JS_MODULE_TYPE, |
| 730 JS_GLOBAL_OBJECT_TYPE, | 733 JS_GLOBAL_OBJECT_TYPE, |
| 731 JS_BUILTINS_OBJECT_TYPE, | 734 JS_BUILTINS_OBJECT_TYPE, |
| 732 JS_GLOBAL_PROXY_TYPE, | 735 JS_GLOBAL_PROXY_TYPE, |
| 733 JS_ARRAY_TYPE, | 736 JS_ARRAY_TYPE, |
| 734 JS_ARRAY_BUFFER_TYPE, | 737 JS_ARRAY_BUFFER_TYPE, |
| 735 JS_SET_TYPE, | 738 JS_SET_TYPE, |
| 736 JS_MAP_TYPE, | 739 JS_MAP_TYPE, |
| 737 JS_WEAK_MAP_TYPE, | 740 JS_WEAK_MAP_TYPE, |
| 738 | 741 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 V(ExternalIntArray) \ | 949 V(ExternalIntArray) \ |
| 947 V(ExternalUnsignedIntArray) \ | 950 V(ExternalUnsignedIntArray) \ |
| 948 V(ExternalFloatArray) \ | 951 V(ExternalFloatArray) \ |
| 949 V(ExternalDoubleArray) \ | 952 V(ExternalDoubleArray) \ |
| 950 V(ExternalPixelArray) \ | 953 V(ExternalPixelArray) \ |
| 951 V(ByteArray) \ | 954 V(ByteArray) \ |
| 952 V(FreeSpace) \ | 955 V(FreeSpace) \ |
| 953 V(JSReceiver) \ | 956 V(JSReceiver) \ |
| 954 V(JSObject) \ | 957 V(JSObject) \ |
| 955 V(JSContextExtensionObject) \ | 958 V(JSContextExtensionObject) \ |
| 959 V(JSGeneratorObject) \ |
| 956 V(JSModule) \ | 960 V(JSModule) \ |
| 957 V(Map) \ | 961 V(Map) \ |
| 958 V(DescriptorArray) \ | 962 V(DescriptorArray) \ |
| 959 V(TransitionArray) \ | 963 V(TransitionArray) \ |
| 960 V(DeoptimizationInputData) \ | 964 V(DeoptimizationInputData) \ |
| 961 V(DeoptimizationOutputData) \ | 965 V(DeoptimizationOutputData) \ |
| 962 V(DependentCode) \ | 966 V(DependentCode) \ |
| 963 V(TypeFeedbackCells) \ | 967 V(TypeFeedbackCells) \ |
| 964 V(FixedArray) \ | 968 V(FixedArray) \ |
| 965 V(FixedDoubleArray) \ | 969 V(FixedDoubleArray) \ |
| 966 V(Context) \ | 970 V(Context) \ |
| 967 V(NativeContext) \ | 971 V(NativeContext) \ |
| 968 V(ScopeInfo) \ | 972 V(ScopeInfo) \ |
| 969 V(JSFunction) \ | 973 V(JSFunction) \ |
| 970 V(Code) \ | 974 V(Code) \ |
| 971 V(Oddball) \ | 975 V(Oddball) \ |
| 972 V(SharedFunctionInfo) \ | 976 V(SharedFunctionInfo) \ |
| (...skipping 5275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6248 ((kNative + kCompilerHintsSmiTagSize) / kBitsPerByte); | 6252 ((kNative + kCompilerHintsSmiTagSize) / kBitsPerByte); |
| 6249 #else | 6253 #else |
| 6250 #error Unknown byte ordering | 6254 #error Unknown byte ordering |
| 6251 #endif | 6255 #endif |
| 6252 | 6256 |
| 6253 private: | 6257 private: |
| 6254 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); | 6258 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); |
| 6255 }; | 6259 }; |
| 6256 | 6260 |
| 6257 | 6261 |
| 6262 class JSGeneratorObject: public JSObject { |
| 6263 public: |
| 6264 // [function]: The function corresponding to this generator object. |
| 6265 DECL_ACCESSORS(function, JSFunction) |
| 6266 |
| 6267 // [context]: The context of the suspended computation, or undefined. |
| 6268 DECL_ACCESSORS(context, Object) |
| 6269 |
| 6270 // [continuation]: Offset into code of continuation. |
| 6271 inline int continuation(); |
| 6272 inline void set_continuation(int continuation); |
| 6273 |
| 6274 // [operands]: Saved operand stack. |
| 6275 DECL_ACCESSORS(operand_stack, FixedArray) |
| 6276 |
| 6277 // Casting. |
| 6278 static inline JSGeneratorObject* cast(Object* obj); |
| 6279 |
| 6280 // Dispatched behavior. |
| 6281 DECLARE_PRINTER(JSGeneratorObject) |
| 6282 DECLARE_VERIFIER(JSGeneratorObject) |
| 6283 |
| 6284 // Layout description. |
| 6285 static const int kFunctionOffset = JSObject::kHeaderSize; |
| 6286 static const int kContextOffset = kFunctionOffset + kPointerSize; |
| 6287 static const int kContinuationOffset = kContextOffset + kPointerSize; |
| 6288 static const int kOperandStackOffset = kContinuationOffset + kPointerSize; |
| 6289 static const int kSize = kOperandStackOffset + kPointerSize; |
| 6290 |
| 6291 private: |
| 6292 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject); |
| 6293 }; |
| 6294 |
| 6295 |
| 6258 // Representation for module instance objects. | 6296 // Representation for module instance objects. |
| 6259 class JSModule: public JSObject { | 6297 class JSModule: public JSObject { |
| 6260 public: | 6298 public: |
| 6261 // [context]: the context holding the module's locals, or undefined if none. | 6299 // [context]: the context holding the module's locals, or undefined if none. |
| 6262 DECL_ACCESSORS(context, Object) | 6300 DECL_ACCESSORS(context, Object) |
| 6263 | 6301 |
| 6264 // [scope_info]: Scope info. | 6302 // [scope_info]: Scope info. |
| 6265 DECL_ACCESSORS(scope_info, ScopeInfo) | 6303 DECL_ACCESSORS(scope_info, ScopeInfo) |
| 6266 | 6304 |
| 6267 // Casting. | 6305 // Casting. |
| (...skipping 3050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9318 } else { | 9356 } else { |
| 9319 value &= ~(1 << bit_position); | 9357 value &= ~(1 << bit_position); |
| 9320 } | 9358 } |
| 9321 return value; | 9359 return value; |
| 9322 } | 9360 } |
| 9323 }; | 9361 }; |
| 9324 | 9362 |
| 9325 } } // namespace v8::internal | 9363 } } // namespace v8::internal |
| 9326 | 9364 |
| 9327 #endif // V8_OBJECTS_H_ | 9365 #endif // V8_OBJECTS_H_ |
| OLD | NEW |