v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
experimental-compiler.h
Go to the documentation of this file.
1
// Copyright 2020 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_REGEXP_EXPERIMENTAL_EXPERIMENTAL_COMPILER_H_
6
#define V8_REGEXP_EXPERIMENTAL_EXPERIMENTAL_COMPILER_H_
7
8
#include "
src/regexp/experimental/experimental-bytecode.h
"
9
#include "
src/regexp/regexp-ast.h
"
10
#include "
src/regexp/regexp-flags.h
"
11
#include "
src/zone/zone-list.h
"
12
13
namespace
v8
{
14
namespace
internal
{
15
16
class
ExperimentalRegExpCompiler
final :
public
AllStatic
{
17
public
:
18
// Checks whether a given RegExpTree can be compiled into an experimental
19
// bytecode program. This mostly amounts to the absence of back references,
20
// but see the definition.
21
// TODO(mbid,v8:10765): Currently more things are not handled, e.g. some
22
// quantifiers and unicode.
23
static
bool
CanBeHandled
(
RegExpTree
* tree,
RegExpFlags
flags,
24
int
capture_count);
25
// Compile regexp into a bytecode program. The regexp must be handlable by
26
// the experimental engine; see`CanBeHandled`. The program is returned as a
27
// ZoneList backed by the same Zone that is used in the RegExpTree argument.
28
static
ZoneList<RegExpInstruction>
Compile
(
RegExpTree
* tree,
29
RegExpFlags
flags,
Zone
* zone);
30
};
31
32
}
// namespace internal
33
}
// namespace v8
34
35
#endif
// V8_REGEXP_EXPERIMENTAL_EXPERIMENTAL_COMPILER_H_
v8::base::Flags< RegExpFlag >
v8::internal::AllStatic
Definition
globals.h:364
v8::internal::ExperimentalRegExpCompiler
Definition
experimental-compiler.h:16
v8::internal::ExperimentalRegExpCompiler::Compile
static ZoneList< RegExpInstruction > Compile(RegExpTree *tree, RegExpFlags flags, Zone *zone)
Definition
experimental-compiler.cc:1227
v8::internal::ExperimentalRegExpCompiler::CanBeHandled
static bool CanBeHandled(RegExpTree *tree, RegExpFlags flags, int capture_count)
Definition
experimental-compiler.cc:221
v8::internal::RegExpTree
Definition
regexp-ast.h:194
v8::internal::ZoneList
Definition
zone-type-traits.h:18
v8::internal::Zone
Definition
zone.h:43
experimental-bytecode.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
regexp-ast.h
regexp-flags.h
zone-list.h
src
regexp
experimental
experimental-compiler.h
Generated on Sun Apr 6 2025 21:08:56 for v8 by
1.12.0