This repository was archived by the owner on Mar 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathStackFrame.php
180 lines (166 loc) · 4.05 KB
/
StackFrame.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<?php declare(strict_types=1);
/**
* This file is part of the phpv8/php-v8 PHP extension.
*
* Copyright (c) 2015-2018 Bogdan Padalko <thepinepain@gmail.com>
*
* Licensed under the MIT license: http://opensource.org/licenses/MIT
*
* For the full copyright and license information, please view the
* LICENSE file that was distributed with this source or visit
* http://opensource.org/licenses/MIT
*/
namespace V8;
/**
* A single JavaScript stack frame.
*/
class StackFrame
{
/**
* @var int|null
*/
private $line_number;
/**
* @var int|null
*/
private $column;
/**
* @var int|null
*/
private $script_id;
/**
* @var string
*/
private $script_name;
/**
* @var string
*/
private $script_name_or_source_url;
/**
* @var string
*/
private $function_name;
/**
* @var bool
*/
private $is_eval;
/**
* @var bool
*/
private $is_constructor;
/**
* @var bool
*/
private $is_wasm;
/**
* @param int|null $line_number
* @param int|null $column
* @param int|null $script_id
* @param string $script_name
* @param string $script_name_or_source_url
* @param string $function_name
* @param bool $is_eval
* @param bool $is_constructor
* @param bool $is_wasm
*/
public function __construct(
?int $line_number = null,
?int $column = null,
?int $script_id = null,
string $script_name = '',
string $script_name_or_source_url = '',
string $function_name = '',
bool $is_eval = false,
bool $is_constructor = false,
bool $is_wasm = false
) {
}
/**
* Returns the number, 1-based, of the line for the associate function call.
* This method will return null if it is unable to
* retrieve the line number, or if kLineNumber was not passed as an option
* when capturing the StackTrace.
*
* @return int
*/
public function getLineNumber(): ?int
{
}
/**
* Returns the 1-based column offset on the line for the associated function
* call.
* This method will return Message::kNoColumnInfo if it is unable to retrieve
* the column number, or if kColumnOffset was not passed as an option when
* capturing the StackTrace.
*
* @return int
*/
public function getColumn(): ?int
{
}
/**
* Returns the id of the script for the function for this StackFrame.
* This method will return Message::kNoScriptIdInfo if it is unable to
* retrieve the script id, or if kScriptId was not passed as an option when
* capturing the StackTrace.
*
* @return int
*/
public function getScriptId(): ?int
{
}
/**
* Returns the name of the resource that contains the script for the
* function for this StackFrame.
*
* @return string
*/
public function getScriptName(): string
{
}
/**
* Returns the name of the resource that contains the script for the
* function for this StackFrame or sourceURL value if the script name
* is undefined and its source ends with //# sourceURL=... string or
* deprecated //@ sourceURL=... string.
*
* @return string
*/
public function getScriptNameOrSourceURL(): string
{
}
/**
* Returns the name of the function associated with this stack frame.
*
* @return string
*/
public function getFunctionName(): string
{
}
/**
* Returns whether or not the associated function is compiled via a call to
* eval().
*
* @return bool
*/
public function isEval(): bool
{
}
/**
* Returns whether or not the associated function is called as a
* constructor via "new".
*
* @return bool
*/
public function isConstructor(): bool
{
}
/**
* Returns whether or not the associated functions is defined in wasm.
*
* @return bool
*/
public function isWasm(): bool
{
}
}