v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
js-generator.h
Go to the documentation of this file.
1// Copyright 2018 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_OBJECTS_JS_GENERATOR_H_
6#define V8_OBJECTS_JS_GENERATOR_H_
7
10
11// Has to be the last include (doesn't have include guards):
13
14namespace v8 {
15namespace internal {
16
17// Forward declarations.
18class JSPromise;
19class StructBodyDescriptor;
20
21#include "torque-generated/src/objects/js-generator-tq.inc"
22
24 : public TorqueGeneratedJSGeneratorObject<JSGeneratorObject, JSObject> {
25 public:
27
28 inline bool is_closed() const;
29 inline bool is_executing() const;
30 inline bool is_suspended() const;
31
32 // For suspended generators: the source position at which the generator
33 // is suspended.
34 int source_position() const;
35 int code_offset() const;
36
37 // Dispatched behavior.
39
40 // Magic sentinel values for the continuation.
41 static const int kGeneratorExecuting = -2;
42 static const int kGeneratorClosed = -1;
43
45};
46
48 : public TorqueGeneratedJSAsyncFunctionObject<JSAsyncFunctionObject,
50 public:
51 // Dispatched behavior.
54
56};
57
59 : public TorqueGeneratedJSAsyncGeneratorObject<JSAsyncGeneratorObject,
60 JSGeneratorObject> {
61 public:
62 // Dispatched behavior.
65
67};
68
70 : public TorqueGeneratedAsyncGeneratorRequest<AsyncGeneratorRequest,
71 Struct> {
72 public:
75
77
79};
80
81} // namespace internal
82} // namespace v8
83
84#include "src/objects/object-macros-undef.h"
85
86#endif // V8_OBJECTS_JS_GENERATOR_H_
static const int kGeneratorClosed
static const int kGeneratorExecuting
#define DECL_VERIFIER(Name)
#define DECL_PRINTER(Name)
#define TQ_OBJECT_CONSTRUCTORS(Type)