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
10
11namespace v8 {
12namespace internal {
13
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.
20 public:
21 // Performs peephole optimization on the given bytecode and returns the
22 // optimized bytecode.
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_
static DirectHandle< TrustedByteArray > OptimizeBytecode(Isolate *isolate, Zone *zone, DirectHandle< String > source, const uint8_t *bytecode, int length, const ZoneUnorderedMap< int, int > &jump_edges)