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 // - JSGeneratorIterator | |
Michael Starzinger
2013/04/08 13:14:05
As discussed offline, the name "JSGeneratorIterato
| |
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_ITERATOR_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_ITERATOR_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(JSGeneratorIterator) \ | |
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) \ |
(...skipping 5265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6231 ((kNative + kCompilerHintsSmiTagSize) / kBitsPerByte); | 6235 ((kNative + kCompilerHintsSmiTagSize) / kBitsPerByte); |
6232 #else | 6236 #else |
6233 #error Unknown byte ordering | 6237 #error Unknown byte ordering |
6234 #endif | 6238 #endif |
6235 | 6239 |
6236 private: | 6240 private: |
6237 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); | 6241 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); |
6238 }; | 6242 }; |
6239 | 6243 |
6240 | 6244 |
6245 // Representation for generator iterators. | |
6246 class JSGeneratorIterator: public JSObject { | |
6247 public: | |
6248 // [function]: The function corresponding to this iterator. | |
6249 DECL_ACCESSORS(function, JSFunction) | |
6250 | |
6251 // [context]: The context of the suspended computation, or Smi 0. | |
6252 DECL_ACCESSORS(context, Object) | |
6253 | |
6254 // [continuation]: Offset into code of continuation. | |
6255 inline int continuation(); | |
6256 inline void set_continuation(int continuation); | |
6257 | |
6258 // [operands]: Saved operand stack: FixedArray or Smi 0. | |
6259 DECL_ACCESSORS(operand_stack, Object) | |
6260 | |
6261 // Casting. | |
6262 static inline JSGeneratorIterator* cast(Object* obj); | |
6263 | |
6264 // Dispatched behavior. | |
6265 DECLARE_PRINTER(JSGeneratorIterator) | |
6266 DECLARE_VERIFIER(JSGeneratorIterator) | |
6267 | |
6268 // Layout description. | |
6269 static const int kFunctionOffset = JSObject::kHeaderSize; | |
6270 static const int kContextOffset = kFunctionOffset + kPointerSize; | |
6271 static const int kContinuationOffset = kContextOffset + kPointerSize; | |
6272 static const int kOperandStackOffset = kContinuationOffset + kPointerSize; | |
6273 static const int kSize = kOperandStackOffset + kPointerSize; | |
6274 | |
6275 private: | |
6276 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorIterator); | |
6277 }; | |
6278 | |
6279 | |
6241 // Representation for module instance objects. | 6280 // Representation for module instance objects. |
6242 class JSModule: public JSObject { | 6281 class JSModule: public JSObject { |
6243 public: | 6282 public: |
6244 // [context]: the context holding the module's locals, or undefined if none. | 6283 // [context]: the context holding the module's locals, or undefined if none. |
6245 DECL_ACCESSORS(context, Object) | 6284 DECL_ACCESSORS(context, Object) |
6246 | 6285 |
6247 // [scope_info]: Scope info. | 6286 // [scope_info]: Scope info. |
6248 DECL_ACCESSORS(scope_info, ScopeInfo) | 6287 DECL_ACCESSORS(scope_info, ScopeInfo) |
6249 | 6288 |
6250 // Casting. | 6289 // Casting. |
(...skipping 3050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9301 } else { | 9340 } else { |
9302 value &= ~(1 << bit_position); | 9341 value &= ~(1 << bit_position); |
9303 } | 9342 } |
9304 return value; | 9343 return value; |
9305 } | 9344 } |
9306 }; | 9345 }; |
9307 | 9346 |
9308 } } // namespace v8::internal | 9347 } } // namespace v8::internal |
9309 | 9348 |
9310 #endif // V8_OBJECTS_H_ | 9349 #endif // V8_OBJECTS_H_ |
OLD | NEW |