v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
js-generator-inl.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_INL_H_
6
#define V8_OBJECTS_JS_GENERATOR_INL_H_
7
8
#include "
src/objects/js-generator.h
"
9
// Include the non-inl header before the rest of the headers.
10
11
#include "
src/objects/js-promise-inl.h
"
12
13
#include "
src/objects/objects-inl.h
"
// Needed for write barriers
14
15
// Has to be the last include (doesn't have include guards):
16
#include "
src/objects/object-macros.h
"
17
18
namespace
v8
{
19
namespace
internal
{
20
21
#include "torque-generated/src/objects/js-generator-tq-inl.inc"
22
23
TQ_OBJECT_CONSTRUCTORS_IMPL
(JSGeneratorObject)
24
TQ_OBJECT_CONSTRUCTORS_IMPL
(JSAsyncFunctionObject)
25
TQ_OBJECT_CONSTRUCTORS_IMPL
(JSAsyncGeneratorObject)
26
TQ_OBJECT_CONSTRUCTORS_IMPL
(AsyncGeneratorRequest)
27
28
bool
JSGeneratorObject
::is_suspended()
const
{
29
DCHECK_LT
(kGeneratorExecuting, 0);
30
DCHECK_LT
(kGeneratorClosed, 0);
31
return
continuation
() >= 0;
32
}
33
34
bool
JSGeneratorObject::is_closed
()
const
{
35
return
continuation
() ==
kGeneratorClosed
;
36
}
37
38
bool
JSGeneratorObject::is_executing
()
const
{
39
return
continuation
() ==
kGeneratorExecuting
;
40
}
41
42
}
// namespace internal
43
}
// namespace v8
44
45
#include "
src/objects/object-macros-undef.h
"
46
47
#endif
// V8_OBJECTS_JS_GENERATOR_INL_H_
v8::internal::JSGeneratorObject
Definition
js-generator.h:24
v8::internal::JSGeneratorObject::kGeneratorClosed
static const int kGeneratorClosed
Definition
js-generator.h:42
v8::internal::JSGeneratorObject::kGeneratorExecuting
static const int kGeneratorExecuting
Definition
js-generator.h:41
v8::internal::JSGeneratorObject::is_executing
bool is_executing() const
Definition
js-generator-inl.h:38
v8::internal::JSGeneratorObject::is_closed
bool is_closed() const
Definition
js-generator-inl.h:34
js-generator.h
js-promise-inl.h
continuation
MovableLabel continuation
Definition
liftoff-compiler.cc:529
v8::internal::bool
bool
Definition
js-function-inl.h:486
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
object-macros-undef.h
object-macros.h
TQ_OBJECT_CONSTRUCTORS_IMPL
#define TQ_OBJECT_CONSTRUCTORS_IMPL(Type)
Definition
object-macros.h:988
objects-inl.h
DCHECK_LT
#define DCHECK_LT(v1, v2)
Definition
logging.h:489
src
objects
js-generator-inl.h
Generated on Sun Apr 6 2025 21:08:55 for v8 by
1.12.0