v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
debug-frames.h
Go to the documentation of this file.
1// Copyright 2015 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_DEBUG_DEBUG_FRAMES_H_
6#define V8_DEBUG_DEBUG_FRAMES_H_
7
8#include <memory>
9
13#include "src/objects/objects.h"
14
15namespace v8 {
16namespace internal {
17
18class JavaScriptFrame;
19class CommonFrame;
20class WasmFrame;
21
23 public:
24 FrameInspector(CommonFrame* frame, int inlined_frame_index, Isolate* isolate);
27
29
32 Handle<Object> GetParameter(int index);
33 Handle<Object> GetExpression(int index);
34 int GetSourcePosition() { return source_position_; }
35 bool IsConstructor() { return is_constructor_; }
36 Handle<Object> GetContext();
38
39 DirectHandle<String> GetFunctionName();
40
41#if V8_ENABLE_WEBASSEMBLY
42 bool IsWasm();
43#if V8_ENABLE_DRUMBRAKE
44 bool IsWasmInterpreter();
45#endif // V8_ENABLE_DRUMBRAKE
46#endif // V8_ENABLE_WEBASSEMBLY
47 bool IsJavaScript();
48
49 JavaScriptFrame* javascript_frame();
50
51 int inlined_frame_index() const { return inlined_frame_index_; }
52
53 private:
54 bool ParameterIsShadowedByContextLocal(DirectHandle<ScopeInfo> info,
55 DirectHandle<String> parameter_name);
56
59 std::unique_ptr<DeoptimizedFrameInfo> deoptimized_frame_;
64 int source_position_ = -1;
65 bool is_optimized_ = false;
66 bool is_constructor_ = false;
67};
68
86
87} // namespace internal
88} // namespace v8
89
90#endif // V8_DEBUG_DEBUG_FRAMES_H_
#define DISALLOW_GARBAGE_COLLECTION(name)
FrameInspector(const FrameInspector &)=delete
Handle< JSFunction > GetFunction() const
FrameInspector & operator=(const FrameInspector &)=delete
Handle< JSFunction > function_
Handle< Script > GetScript()
Handle< Object > GetReceiver()
std::unique_ptr< DeoptimizedFrameInfo > deoptimized_frame_
void VisitThread(Isolate *isolate, ThreadLocalTop *top) override
RedirectActiveFunctions(Isolate *isolate, Tagged< SharedFunctionInfo > shared, Mode mode)
Tagged< SharedFunctionInfo > shared_
const JSFunctionRef function_
Handle< Script > script_
DisallowGarbageCollection no_gc_
Node * receiver_
#define V8_EXPORT_PRIVATE
Definition macros.h:460