v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
js-raw-json.h
Go to the documentation of this file.
1// Copyright 2022 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_RAW_JSON_H_
6#define V8_OBJECTS_JS_RAW_JSON_H_
7
9
10// Has to be the last include (doesn't have include guards):
12
13namespace v8 {
14namespace internal {
15
16#include "torque-generated/src/objects/js-raw-json-tq.inc"
17
18class JSRawJson : public TorqueGeneratedJSRawJson<JSRawJson, JSObject> {
19 public:
20 // Initial layout description.
21#define JS_RAW_JSON_FIELDS(V) \
22 V(kRawJsonInitialOffset, kTaggedSize) \
23 /* Total size. */ \
24 V(kInitialSize, 0)
26#undef JS_RAW_JSON_FIELDS
27
28 // Index only valid to use if HasInitialLayout() returns true.
29 static const int kRawJsonInitialIndex = 0;
30
31 // Returns whether this raw JSON object has the initial layout and the
32 // "rawJSON" property can be directly accessed using kRawJsonInitialIndex.
33 inline bool HasInitialLayout(Isolate* isolate) const;
34
36 Isolate* isolate, Handle<Object> text);
37
39
41};
42
43} // namespace internal
44} // namespace v8
45
47
48#endif // V8_OBJECTS_JS_RAW_JSON_H_
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< JSRawJson > Create(Isolate *isolate, Handle< Object > text)
static const int kRawJsonInitialIndex
Definition js-raw-json.h:29
bool HasInitialLayout(Isolate *isolate) const
#define JS_RAW_JSON_FIELDS(V)
Definition js-raw-json.h:21
#define DECL_PRINTER(Name)
#define TQ_OBJECT_CONSTRUCTORS(Type)
#define DEFINE_FIELD_OFFSET_CONSTANTS(StartOffset, LIST_MACRO)
Definition utils.h:242
#define V8_WARN_UNUSED_RESULT
Definition v8config.h:671