| 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 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 8058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8069 inline int continuation() const; | 8069 inline int continuation() const; |
| 8070 inline void set_continuation(int continuation); | 8070 inline void set_continuation(int continuation); |
| 8071 inline bool is_closed() const; | 8071 inline bool is_closed() const; |
| 8072 inline bool is_executing() const; | 8072 inline bool is_executing() const; |
| 8073 inline bool is_suspended() const; | 8073 inline bool is_suspended() const; |
| 8074 | 8074 |
| 8075 // For suspended generators: the source position at which the generator | 8075 // For suspended generators: the source position at which the generator |
| 8076 // is suspended. | 8076 // is suspended. |
| 8077 int source_position() const; | 8077 int source_position() const; |
| 8078 | 8078 |
| 8079 // [operand_stack]: Saved operand stack. | 8079 // [register_file]: Saved interpreter register file. |
| 8080 DECL_ACCESSORS(operand_stack, FixedArray) | 8080 DECL_ACCESSORS(register_file, FixedArray) |
| 8081 | 8081 |
| 8082 DECLARE_CAST(JSGeneratorObject) | 8082 DECLARE_CAST(JSGeneratorObject) |
| 8083 | 8083 |
| 8084 // Dispatched behavior. | 8084 // Dispatched behavior. |
| 8085 DECLARE_VERIFIER(JSGeneratorObject) | 8085 DECLARE_VERIFIER(JSGeneratorObject) |
| 8086 | 8086 |
| 8087 // Magic sentinel values for the continuation. | 8087 // Magic sentinel values for the continuation. |
| 8088 static const int kGeneratorExecuting = -2; | 8088 static const int kGeneratorExecuting = -2; |
| 8089 static const int kGeneratorClosed = -1; | 8089 static const int kGeneratorClosed = -1; |
| 8090 | 8090 |
| 8091 // Layout description. | 8091 // Layout description. |
| 8092 static const int kFunctionOffset = JSObject::kHeaderSize; | 8092 static const int kFunctionOffset = JSObject::kHeaderSize; |
| 8093 static const int kContextOffset = kFunctionOffset + kPointerSize; | 8093 static const int kContextOffset = kFunctionOffset + kPointerSize; |
| 8094 static const int kReceiverOffset = kContextOffset + kPointerSize; | 8094 static const int kReceiverOffset = kContextOffset + kPointerSize; |
| 8095 static const int kInputOrDebugPosOffset = kReceiverOffset + kPointerSize; | 8095 static const int kInputOrDebugPosOffset = kReceiverOffset + kPointerSize; |
| 8096 static const int kResumeModeOffset = kInputOrDebugPosOffset + kPointerSize; | 8096 static const int kResumeModeOffset = kInputOrDebugPosOffset + kPointerSize; |
| 8097 static const int kContinuationOffset = kResumeModeOffset + kPointerSize; | 8097 static const int kContinuationOffset = kResumeModeOffset + kPointerSize; |
| 8098 static const int kOperandStackOffset = kContinuationOffset + kPointerSize; | 8098 static const int kRegisterFileOffset = kContinuationOffset + kPointerSize; |
| 8099 static const int kSize = kOperandStackOffset + kPointerSize; | 8099 static const int kSize = kRegisterFileOffset + kPointerSize; |
| 8100 | 8100 |
| 8101 private: | 8101 private: |
| 8102 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject); | 8102 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject); |
| 8103 }; | 8103 }; |
| 8104 | 8104 |
| 8105 class ModuleInfoEntry : public Struct { | 8105 class ModuleInfoEntry : public Struct { |
| 8106 public: | 8106 public: |
| 8107 DECLARE_CAST(ModuleInfoEntry) | 8107 DECLARE_CAST(ModuleInfoEntry) |
| 8108 DECLARE_PRINTER(ModuleInfoEntry) | 8108 DECLARE_PRINTER(ModuleInfoEntry) |
| 8109 DECLARE_VERIFIER(ModuleInfoEntry) | 8109 DECLARE_VERIFIER(ModuleInfoEntry) |
| (...skipping 3752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11862 } | 11862 } |
| 11863 return value; | 11863 return value; |
| 11864 } | 11864 } |
| 11865 }; | 11865 }; |
| 11866 | 11866 |
| 11867 | 11867 |
| 11868 } // NOLINT, false-positive due to second-order macros. | 11868 } // NOLINT, false-positive due to second-order macros. |
| 11869 } // NOLINT, false-positive due to second-order macros. | 11869 } // NOLINT, false-positive due to second-order macros. |
| 11870 | 11870 |
| 11871 #endif // V8_OBJECTS_H_ | 11871 #endif // V8_OBJECTS_H_ |
| OLD | NEW |