| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 7250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7261 | 7261 |
| 7262 | 7262 |
| 7263 class JSGeneratorObject: public JSObject { | 7263 class JSGeneratorObject: public JSObject { |
| 7264 public: | 7264 public: |
| 7265 // [function]: The function corresponding to this generator object. | 7265 // [function]: The function corresponding to this generator object. |
| 7266 DECL_ACCESSORS(function, JSFunction) | 7266 DECL_ACCESSORS(function, JSFunction) |
| 7267 | 7267 |
| 7268 // [context]: The context of the suspended computation. | 7268 // [context]: The context of the suspended computation. |
| 7269 DECL_ACCESSORS(context, Context) | 7269 DECL_ACCESSORS(context, Context) |
| 7270 | 7270 |
| 7271 // [receiver]: The receiver of the suspended computation. | |
| 7272 DECL_ACCESSORS(receiver, Object) | |
| 7273 | |
| 7274 // [input]: The most recent input value. | 7271 // [input]: The most recent input value. |
| 7275 DECL_ACCESSORS(input, Object) | 7272 DECL_ACCESSORS(input, Object) |
| 7276 | 7273 |
| 7277 // [resume_mode]: The most recent resume mode. | 7274 // [resume_mode]: The most recent resume mode. |
| 7278 enum ResumeMode { kNext, kReturn, kThrow }; | 7275 enum ResumeMode { kNext, kReturn, kThrow }; |
| 7279 DECL_INT_ACCESSORS(resume_mode) | 7276 DECL_INT_ACCESSORS(resume_mode) |
| 7280 | 7277 |
| 7281 // [continuation]: Offset into code of continuation. | 7278 // [continuation]: Offset into code of continuation. |
| 7282 // | 7279 // |
| 7283 // A positive offset indicates a suspended generator. The special | 7280 // A positive offset indicates a suspended generator. The special |
| (...skipping 13 matching lines...) Expand all Loading... |
| 7297 // Dispatched behavior. | 7294 // Dispatched behavior. |
| 7298 DECLARE_VERIFIER(JSGeneratorObject) | 7295 DECLARE_VERIFIER(JSGeneratorObject) |
| 7299 | 7296 |
| 7300 // Magic sentinel values for the continuation. | 7297 // Magic sentinel values for the continuation. |
| 7301 static const int kGeneratorExecuting = -2; | 7298 static const int kGeneratorExecuting = -2; |
| 7302 static const int kGeneratorClosed = -1; | 7299 static const int kGeneratorClosed = -1; |
| 7303 | 7300 |
| 7304 // Layout description. | 7301 // Layout description. |
| 7305 static const int kFunctionOffset = JSObject::kHeaderSize; | 7302 static const int kFunctionOffset = JSObject::kHeaderSize; |
| 7306 static const int kContextOffset = kFunctionOffset + kPointerSize; | 7303 static const int kContextOffset = kFunctionOffset + kPointerSize; |
| 7307 static const int kReceiverOffset = kContextOffset + kPointerSize; | 7304 static const int kInputOffset = kContextOffset + kPointerSize; |
| 7308 static const int kInputOffset = kReceiverOffset + kPointerSize; | |
| 7309 static const int kResumeModeOffset = kInputOffset + kPointerSize; | 7305 static const int kResumeModeOffset = kInputOffset + kPointerSize; |
| 7310 static const int kContinuationOffset = kResumeModeOffset + kPointerSize; | 7306 static const int kContinuationOffset = kResumeModeOffset + kPointerSize; |
| 7311 static const int kOperandStackOffset = kContinuationOffset + kPointerSize; | 7307 static const int kOperandStackOffset = kContinuationOffset + kPointerSize; |
| 7312 static const int kSize = kOperandStackOffset + kPointerSize; | 7308 static const int kSize = kOperandStackOffset + kPointerSize; |
| 7313 | 7309 |
| 7314 private: | 7310 private: |
| 7315 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject); | 7311 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject); |
| 7316 }; | 7312 }; |
| 7317 | 7313 |
| 7318 | 7314 |
| (...skipping 3414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10733 } | 10729 } |
| 10734 return value; | 10730 return value; |
| 10735 } | 10731 } |
| 10736 }; | 10732 }; |
| 10737 | 10733 |
| 10738 | 10734 |
| 10739 } // NOLINT, false-positive due to second-order macros. | 10735 } // NOLINT, false-positive due to second-order macros. |
| 10740 } // NOLINT, false-positive due to second-order macros. | 10736 } // NOLINT, false-positive due to second-order macros. |
| 10741 | 10737 |
| 10742 #endif // V8_OBJECTS_H_ | 10738 #endif // V8_OBJECTS_H_ |
| OLD | NEW |