v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
osr.h
Go to the documentation of this file.
1// Copyright 2014 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_COMPILER_OSR_H_
6#define V8_COMPILER_OSR_H_
7
8#include <stddef.h>
9
10#include "src/base/macros.h"
11
12namespace v8 {
13namespace internal {
14
15class OptimizedCompilationInfo;
16
17namespace compiler {
18
19class Frame;
20
21// Encapsulates logic relating to OSR compilations as well has handles some
22// details of the frame layout.
23class OsrHelper {
24 public:
25 explicit OsrHelper(OptimizedCompilationInfo* info);
26
27 // Prepares the frame w.r.t. OSR.
29
30 // Returns the number of unoptimized frame slots for this OSR.
32
33 // Returns the environment index of the first stack slot.
35 // TurboFan environments do not contain the context.
36 return 1 + parameter_count; // receiver + params
37 }
38
39 private:
42};
43
44} // namespace compiler
45} // namespace internal
46} // namespace v8
47
48#endif // V8_COMPILER_OSR_H_
int16_t parameter_count
Definition builtins.cc:67
V8_EXPORT_PRIVATE void SetupFrame(Frame *frame)
Definition osr.cc:21
OsrHelper(OptimizedCompilationInfo *info)
Definition osr.cc:15
static int FirstStackSlotIndex(int parameter_count)
Definition osr.h:34
#define V8_EXPORT_PRIVATE
Definition macros.h:460