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
9// Include the non-inl header before the rest of the headers.
10
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):
17
18namespace v8 {
19namespace internal {
20
21#include "torque-generated/src/objects/js-generator-tq-inl.inc"
22
23TQ_OBJECT_CONSTRUCTORS_IMPL(JSGeneratorObject)
24TQ_OBJECT_CONSTRUCTORS_IMPL(JSAsyncFunctionObject)
25TQ_OBJECT_CONSTRUCTORS_IMPL(JSAsyncGeneratorObject)
26TQ_OBJECT_CONSTRUCTORS_IMPL(AsyncGeneratorRequest)
27
28bool JSGeneratorObject::is_suspended() const {
29 DCHECK_LT(kGeneratorExecuting, 0);
30 DCHECK_LT(kGeneratorClosed, 0);
31 return continuation() >= 0;
32}
33
37
41
42} // namespace internal
43} // namespace v8
44
46
47#endif // V8_OBJECTS_JS_GENERATOR_INL_H_
static const int kGeneratorClosed
static const int kGeneratorExecuting
MovableLabel continuation
#define TQ_OBJECT_CONSTRUCTORS_IMPL(Type)
#define DCHECK_LT(v1, v2)
Definition logging.h:489