v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
regexp-bytecode-peephole.h
Go to the documentation of this file.
1
// Copyright 2019 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_REGEXP_BYTECODE_PEEPHOLE_H_
6
#define V8_REGEXP_REGEXP_BYTECODE_PEEPHOLE_H_
7
8
#include "
src/common/globals.h
"
9
#include "
src/zone/zone-containers.h
"
10
11
namespace
v8
{
12
namespace
internal
{
13
14
class
TrustedByteArray
;
15
16
// Peephole optimization for regexp interpreter bytecode.
17
// Pre-defined bytecode sequences occuring in the bytecode generated by the
18
// RegExpBytecodeGenerator can be optimized into a single bytecode.
19
class
RegExpBytecodePeepholeOptimization
:
public
AllStatic
{
20
public
:
21
// Performs peephole optimization on the given bytecode and returns the
22
// optimized bytecode.
23
static
DirectHandle<TrustedByteArray>
OptimizeBytecode
(
24
Isolate
* isolate,
Zone
* zone,
DirectHandle<String>
source,
25
const
uint8_t* bytecode,
int
length,
26
const
ZoneUnorderedMap<int, int>
& jump_edges);
27
};
28
29
}
// namespace internal
30
}
// namespace v8
31
32
#endif
// V8_REGEXP_REGEXP_BYTECODE_PEEPHOLE_H_
v8::internal::AllStatic
Definition
globals.h:364
v8::internal::DirectHandle
Definition
handles.h:659
v8::internal::Isolate
Definition
isolate.h:586
v8::internal::RegExpBytecodePeepholeOptimization
Definition
regexp-bytecode-peephole.h:19
v8::internal::RegExpBytecodePeepholeOptimization::OptimizeBytecode
static DirectHandle< TrustedByteArray > OptimizeBytecode(Isolate *isolate, Zone *zone, DirectHandle< String > source, const uint8_t *bytecode, int length, const ZoneUnorderedMap< int, int > &jump_edges)
Definition
regexp-bytecode-peephole.cc:1015
v8::internal::ZoneUnorderedMap
Definition
zone-containers.h:712
v8::internal::Zone
Definition
zone.h:43
globals.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8::internal::TrustedByteArray
TrustedByteArray
Definition
js-regexp-inl.h:121
v8
Definition
api-arguments-inl.h:19
zone-containers.h
src
regexp
regexp-bytecode-peephole.h
Generated on Sun Apr 6 2025 21:08:56 for v8 by
1.12.0