v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
osr.cc
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
#include "
src/compiler/osr.h
"
6
7
#include "
src/codegen/optimized-compilation-info.h
"
8
#include "
src/compiler/frame.h
"
9
#include "
src/objects/js-array-inl.h
"
10
11
namespace
v8
{
12
namespace
internal
{
13
namespace
compiler {
14
15
OsrHelper::OsrHelper
(
OptimizedCompilationInfo
* info)
16
: parameter_count_(info->bytecode_array()->
parameter_count
()),
17
stack_slot_count_(
UnoptimizedFrameConstants
::RegisterStackSlotCount(
18
info->bytecode_array()->register_count()) +
19
UnoptimizedFrameConstants
::kExtraSlotCount) {}
20
21
void
OsrHelper::SetupFrame
(
Frame
* frame) {
22
// The optimized frame will subsume the unoptimized frame. Do so by reserving
23
// the first spill slots.
24
frame->
ReserveSpillSlots
(
UnoptimizedFrameSlots
());
25
}
26
27
}
// namespace compiler
28
}
// namespace internal
29
}
// namespace v8
parameter_count
int16_t parameter_count
Definition
builtins.cc:67
v8::internal::OptimizedCompilationInfo
Definition
optimized-compilation-info.h:54
v8::internal::UnoptimizedFrameConstants
Definition
frame-constants.h:735
v8::internal::compiler::Frame
Definition
frame.h:91
v8::internal::compiler::Frame::ReserveSpillSlots
int ReserveSpillSlots(size_t slot_count)
Definition
frame.h:180
v8::internal::compiler::OsrHelper::SetupFrame
V8_EXPORT_PRIVATE void SetupFrame(Frame *frame)
Definition
osr.cc:21
v8::internal::compiler::OsrHelper::UnoptimizedFrameSlots
size_t UnoptimizedFrameSlots()
Definition
osr.h:31
v8::internal::compiler::OsrHelper::OsrHelper
OsrHelper(OptimizedCompilationInfo *info)
Definition
osr.cc:15
frame.h
js-array-inl.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
optimized-compilation-info.h
osr.h
src
compiler
osr.cc
Generated on Sun Apr 6 2025 21:08:52 for v8 by
1.12.0