libv8 3.16.14.19.1-universal-darwin → 8.4.255.0.1-universal-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/libv8/location.rb +15 -7
- data/ext/libv8/paths.rb +6 -19
- data/lib/libv8/version.rb +1 -1
- data/vendor/v8/include/cppgc/allocation.h +124 -0
- data/vendor/v8/include/cppgc/garbage-collected.h +192 -0
- data/vendor/v8/include/cppgc/heap.h +50 -0
- data/vendor/v8/include/cppgc/internal/accessors.h +26 -0
- data/vendor/v8/include/cppgc/internal/api-constants.h +44 -0
- data/vendor/v8/include/cppgc/internal/compiler-specific.h +26 -0
- data/vendor/v8/include/cppgc/internal/finalizer-trait.h +90 -0
- data/vendor/v8/include/cppgc/internal/gc-info.h +43 -0
- data/vendor/v8/include/cppgc/internal/logging.h +50 -0
- data/vendor/v8/include/cppgc/internal/persistent-node.h +109 -0
- data/vendor/v8/include/cppgc/internal/pointer-policies.h +133 -0
- data/vendor/v8/include/cppgc/internal/prefinalizer-handler.h +31 -0
- data/vendor/v8/include/cppgc/liveness-broker.h +50 -0
- data/vendor/v8/include/cppgc/macros.h +26 -0
- data/vendor/v8/include/cppgc/member.h +206 -0
- data/vendor/v8/include/cppgc/persistent.h +304 -0
- data/vendor/v8/include/cppgc/platform.h +31 -0
- data/vendor/v8/include/cppgc/prefinalizer.h +54 -0
- data/vendor/v8/include/cppgc/source-location.h +59 -0
- data/vendor/v8/include/cppgc/trace-trait.h +67 -0
- data/vendor/v8/include/cppgc/type-traits.h +109 -0
- data/vendor/v8/include/cppgc/visitor.h +137 -0
- data/vendor/v8/include/libplatform/libplatform-export.h +29 -0
- data/vendor/v8/include/libplatform/libplatform.h +85 -0
- data/vendor/v8/include/libplatform/v8-tracing.h +332 -0
- data/vendor/v8/include/v8-fast-api-calls.h +412 -0
- data/vendor/v8/include/v8-inspector-protocol.h +13 -0
- data/vendor/v8/include/v8-inspector.h +327 -0
- data/vendor/v8/include/v8-internal.h +389 -0
- data/vendor/v8/include/v8-platform.h +577 -0
- data/vendor/v8/include/v8-profiler.h +744 -265
- data/vendor/v8/include/v8-util.h +652 -0
- data/vendor/v8/include/v8-value-serializer-version.h +24 -0
- data/vendor/v8/include/v8-version-string.h +38 -0
- data/vendor/v8/include/v8-version.h +20 -0
- data/vendor/v8/include/v8-wasm-trap-handler-posix.h +31 -0
- data/vendor/v8/include/v8-wasm-trap-handler-win.h +28 -0
- data/vendor/v8/include/v8.h +10228 -3147
- data/vendor/v8/include/v8config.h +465 -0
- data/vendor/v8/out.gn/libv8/obj/libv8_libbase.a +0 -0
- data/vendor/v8/out.gn/libv8/obj/libv8_libplatform.a +0 -0
- data/vendor/v8/out.gn/libv8/obj/libv8_monolith.a +0 -0
- data/vendor/v8/out.gn/libv8/obj/third_party/icu/libicui18n.a +0 -0
- data/vendor/v8/out.gn/libv8/obj/third_party/icu/libicuuc.a +0 -0
- data/vendor/v8/out.gn/libv8/obj/third_party/zlib/google/libcompression_utils_portable.a +0 -0
- data/vendor/v8/out.gn/libv8/obj/third_party/zlib/libchrome_zlib.a +0 -0
- metadata +52 -32
- data/ext/libv8/arch.rb +0 -43
- data/vendor/v8/include/v8-debug.h +0 -408
- data/vendor/v8/include/v8-preparser.h +0 -118
- data/vendor/v8/include/v8-testing.h +0 -105
- data/vendor/v8/include/v8stdint.h +0 -54
- data/vendor/v8/out/x64.release/libpreparser_lib.a +0 -0
- data/vendor/v8/out/x64.release/libv8_base.a +0 -0
- data/vendor/v8/out/x64.release/libv8_nosnapshot.a +0 -0
- data/vendor/v8/out/x64.release/libv8_snapshot.a +0 -0
@@ -1,408 +0,0 @@
|
|
1
|
-
// Copyright 2008 the V8 project authors. All rights reserved.
|
2
|
-
// Redistribution and use in source and binary forms, with or without
|
3
|
-
// modification, are permitted provided that the following conditions are
|
4
|
-
// met:
|
5
|
-
//
|
6
|
-
// * Redistributions of source code must retain the above copyright
|
7
|
-
// notice, this list of conditions and the following disclaimer.
|
8
|
-
// * Redistributions in binary form must reproduce the above
|
9
|
-
// copyright notice, this list of conditions and the following
|
10
|
-
// disclaimer in the documentation and/or other materials provided
|
11
|
-
// with the distribution.
|
12
|
-
// * Neither the name of Google Inc. nor the names of its
|
13
|
-
// contributors may be used to endorse or promote products derived
|
14
|
-
// from this software without specific prior written permission.
|
15
|
-
//
|
16
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
|
28
|
-
#ifndef V8_V8_DEBUG_H_
|
29
|
-
#define V8_V8_DEBUG_H_
|
30
|
-
|
31
|
-
#include "v8.h"
|
32
|
-
|
33
|
-
#ifdef _WIN32
|
34
|
-
typedef int int32_t;
|
35
|
-
typedef unsigned int uint32_t;
|
36
|
-
typedef unsigned short uint16_t; // NOLINT
|
37
|
-
typedef long long int64_t; // NOLINT
|
38
|
-
|
39
|
-
// Setup for Windows DLL export/import. See v8.h in this directory for
|
40
|
-
// information on how to build/use V8 as a DLL.
|
41
|
-
#if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
|
42
|
-
#error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the\
|
43
|
-
build configuration to ensure that at most one of these is set
|
44
|
-
#endif
|
45
|
-
|
46
|
-
#ifdef BUILDING_V8_SHARED
|
47
|
-
#define EXPORT __declspec(dllexport)
|
48
|
-
#elif USING_V8_SHARED
|
49
|
-
#define EXPORT __declspec(dllimport)
|
50
|
-
#else
|
51
|
-
#define EXPORT
|
52
|
-
#endif
|
53
|
-
|
54
|
-
#else // _WIN32
|
55
|
-
|
56
|
-
// Setup for Linux shared library export. See v8.h in this directory for
|
57
|
-
// information on how to build/use V8 as shared library.
|
58
|
-
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED)
|
59
|
-
#define EXPORT __attribute__ ((visibility("default")))
|
60
|
-
#else // defined(__GNUC__) && (__GNUC__ >= 4)
|
61
|
-
#define EXPORT
|
62
|
-
#endif // defined(__GNUC__) && (__GNUC__ >= 4)
|
63
|
-
|
64
|
-
#endif // _WIN32
|
65
|
-
|
66
|
-
|
67
|
-
/**
|
68
|
-
* Debugger support for the V8 JavaScript engine.
|
69
|
-
*/
|
70
|
-
namespace v8 {
|
71
|
-
|
72
|
-
// Debug events which can occur in the V8 JavaScript engine.
|
73
|
-
enum DebugEvent {
|
74
|
-
Break = 1,
|
75
|
-
Exception = 2,
|
76
|
-
NewFunction = 3,
|
77
|
-
BeforeCompile = 4,
|
78
|
-
AfterCompile = 5,
|
79
|
-
ScriptCollected = 6,
|
80
|
-
BreakForCommand = 7
|
81
|
-
};
|
82
|
-
|
83
|
-
|
84
|
-
class EXPORT Debug {
|
85
|
-
public:
|
86
|
-
/**
|
87
|
-
* A client object passed to the v8 debugger whose ownership will be taken by
|
88
|
-
* it. v8 is always responsible for deleting the object.
|
89
|
-
*/
|
90
|
-
class ClientData {
|
91
|
-
public:
|
92
|
-
virtual ~ClientData() {}
|
93
|
-
};
|
94
|
-
|
95
|
-
|
96
|
-
/**
|
97
|
-
* A message object passed to the debug message handler.
|
98
|
-
*/
|
99
|
-
class Message {
|
100
|
-
public:
|
101
|
-
/**
|
102
|
-
* Check type of message.
|
103
|
-
*/
|
104
|
-
virtual bool IsEvent() const = 0;
|
105
|
-
virtual bool IsResponse() const = 0;
|
106
|
-
virtual DebugEvent GetEvent() const = 0;
|
107
|
-
|
108
|
-
/**
|
109
|
-
* Indicate whether this is a response to a continue command which will
|
110
|
-
* start the VM running after this is processed.
|
111
|
-
*/
|
112
|
-
virtual bool WillStartRunning() const = 0;
|
113
|
-
|
114
|
-
/**
|
115
|
-
* Access to execution state and event data. Don't store these cross
|
116
|
-
* callbacks as their content becomes invalid. These objects are from the
|
117
|
-
* debugger event that started the debug message loop.
|
118
|
-
*/
|
119
|
-
virtual Handle<Object> GetExecutionState() const = 0;
|
120
|
-
virtual Handle<Object> GetEventData() const = 0;
|
121
|
-
|
122
|
-
/**
|
123
|
-
* Get the debugger protocol JSON.
|
124
|
-
*/
|
125
|
-
virtual Handle<String> GetJSON() const = 0;
|
126
|
-
|
127
|
-
/**
|
128
|
-
* Get the context active when the debug event happened. Note this is not
|
129
|
-
* the current active context as the JavaScript part of the debugger is
|
130
|
-
* running in its own context which is entered at this point.
|
131
|
-
*/
|
132
|
-
virtual Handle<Context> GetEventContext() const = 0;
|
133
|
-
|
134
|
-
/**
|
135
|
-
* Client data passed with the corresponding request if any. This is the
|
136
|
-
* client_data data value passed into Debug::SendCommand along with the
|
137
|
-
* request that led to the message or NULL if the message is an event. The
|
138
|
-
* debugger takes ownership of the data and will delete it even if there is
|
139
|
-
* no message handler.
|
140
|
-
*/
|
141
|
-
virtual ClientData* GetClientData() const = 0;
|
142
|
-
|
143
|
-
virtual ~Message() {}
|
144
|
-
};
|
145
|
-
|
146
|
-
|
147
|
-
/**
|
148
|
-
* An event details object passed to the debug event listener.
|
149
|
-
*/
|
150
|
-
class EventDetails {
|
151
|
-
public:
|
152
|
-
/**
|
153
|
-
* Event type.
|
154
|
-
*/
|
155
|
-
virtual DebugEvent GetEvent() const = 0;
|
156
|
-
|
157
|
-
/**
|
158
|
-
* Access to execution state and event data of the debug event. Don't store
|
159
|
-
* these cross callbacks as their content becomes invalid.
|
160
|
-
*/
|
161
|
-
virtual Handle<Object> GetExecutionState() const = 0;
|
162
|
-
virtual Handle<Object> GetEventData() const = 0;
|
163
|
-
|
164
|
-
/**
|
165
|
-
* Get the context active when the debug event happened. Note this is not
|
166
|
-
* the current active context as the JavaScript part of the debugger is
|
167
|
-
* running in its own context which is entered at this point.
|
168
|
-
*/
|
169
|
-
virtual Handle<Context> GetEventContext() const = 0;
|
170
|
-
|
171
|
-
/**
|
172
|
-
* Client data passed with the corresponding callback when it was
|
173
|
-
* registered.
|
174
|
-
*/
|
175
|
-
virtual Handle<Value> GetCallbackData() const = 0;
|
176
|
-
|
177
|
-
/**
|
178
|
-
* Client data passed to DebugBreakForCommand function. The
|
179
|
-
* debugger takes ownership of the data and will delete it even if
|
180
|
-
* there is no message handler.
|
181
|
-
*/
|
182
|
-
virtual ClientData* GetClientData() const = 0;
|
183
|
-
|
184
|
-
virtual ~EventDetails() {}
|
185
|
-
};
|
186
|
-
|
187
|
-
|
188
|
-
/**
|
189
|
-
* Debug event callback function.
|
190
|
-
*
|
191
|
-
* \param event the type of the debug event that triggered the callback
|
192
|
-
* (enum DebugEvent)
|
193
|
-
* \param exec_state execution state (JavaScript object)
|
194
|
-
* \param event_data event specific data (JavaScript object)
|
195
|
-
* \param data value passed by the user to SetDebugEventListener
|
196
|
-
*/
|
197
|
-
typedef void (*EventCallback)(DebugEvent event,
|
198
|
-
Handle<Object> exec_state,
|
199
|
-
Handle<Object> event_data,
|
200
|
-
Handle<Value> data);
|
201
|
-
|
202
|
-
/**
|
203
|
-
* Debug event callback function.
|
204
|
-
*
|
205
|
-
* \param event_details object providing information about the debug event
|
206
|
-
*
|
207
|
-
* A EventCallback2 does not take possession of the event data,
|
208
|
-
* and must not rely on the data persisting after the handler returns.
|
209
|
-
*/
|
210
|
-
typedef void (*EventCallback2)(const EventDetails& event_details);
|
211
|
-
|
212
|
-
/**
|
213
|
-
* Debug message callback function.
|
214
|
-
*
|
215
|
-
* \param message the debug message handler message object
|
216
|
-
* \param length length of the message
|
217
|
-
* \param client_data the data value passed when registering the message handler
|
218
|
-
|
219
|
-
* A MessageHandler does not take possession of the message string,
|
220
|
-
* and must not rely on the data persisting after the handler returns.
|
221
|
-
*
|
222
|
-
* This message handler is deprecated. Use MessageHandler2 instead.
|
223
|
-
*/
|
224
|
-
typedef void (*MessageHandler)(const uint16_t* message, int length,
|
225
|
-
ClientData* client_data);
|
226
|
-
|
227
|
-
/**
|
228
|
-
* Debug message callback function.
|
229
|
-
*
|
230
|
-
* \param message the debug message handler message object
|
231
|
-
*
|
232
|
-
* A MessageHandler does not take possession of the message data,
|
233
|
-
* and must not rely on the data persisting after the handler returns.
|
234
|
-
*/
|
235
|
-
typedef void (*MessageHandler2)(const Message& message);
|
236
|
-
|
237
|
-
/**
|
238
|
-
* Debug host dispatch callback function.
|
239
|
-
*/
|
240
|
-
typedef void (*HostDispatchHandler)();
|
241
|
-
|
242
|
-
/**
|
243
|
-
* Callback function for the host to ensure debug messages are processed.
|
244
|
-
*/
|
245
|
-
typedef void (*DebugMessageDispatchHandler)();
|
246
|
-
|
247
|
-
// Set a C debug event listener.
|
248
|
-
static bool SetDebugEventListener(EventCallback that,
|
249
|
-
Handle<Value> data = Handle<Value>());
|
250
|
-
static bool SetDebugEventListener2(EventCallback2 that,
|
251
|
-
Handle<Value> data = Handle<Value>());
|
252
|
-
|
253
|
-
// Set a JavaScript debug event listener.
|
254
|
-
static bool SetDebugEventListener(v8::Handle<v8::Object> that,
|
255
|
-
Handle<Value> data = Handle<Value>());
|
256
|
-
|
257
|
-
// Schedule a debugger break to happen when JavaScript code is run
|
258
|
-
// in the given isolate. If no isolate is provided the default
|
259
|
-
// isolate is used.
|
260
|
-
static void DebugBreak(Isolate* isolate = NULL);
|
261
|
-
|
262
|
-
// Remove scheduled debugger break in given isolate if it has not
|
263
|
-
// happened yet. If no isolate is provided the default isolate is
|
264
|
-
// used.
|
265
|
-
static void CancelDebugBreak(Isolate* isolate = NULL);
|
266
|
-
|
267
|
-
// Break execution of JavaScript in the given isolate (this method
|
268
|
-
// can be invoked from a non-VM thread) for further client command
|
269
|
-
// execution on a VM thread. Client data is then passed in
|
270
|
-
// EventDetails to EventCallback at the moment when the VM actually
|
271
|
-
// stops. If no isolate is provided the default isolate is used.
|
272
|
-
static void DebugBreakForCommand(ClientData* data = NULL,
|
273
|
-
Isolate* isolate = NULL);
|
274
|
-
|
275
|
-
// Message based interface. The message protocol is JSON. NOTE the message
|
276
|
-
// handler thread is not supported any more parameter must be false.
|
277
|
-
static void SetMessageHandler(MessageHandler handler,
|
278
|
-
bool message_handler_thread = false);
|
279
|
-
static void SetMessageHandler2(MessageHandler2 handler);
|
280
|
-
|
281
|
-
// If no isolate is provided the default isolate is
|
282
|
-
// used.
|
283
|
-
static void SendCommand(const uint16_t* command, int length,
|
284
|
-
ClientData* client_data = NULL,
|
285
|
-
Isolate* isolate = NULL);
|
286
|
-
|
287
|
-
// Dispatch interface.
|
288
|
-
static void SetHostDispatchHandler(HostDispatchHandler handler,
|
289
|
-
int period = 100);
|
290
|
-
|
291
|
-
/**
|
292
|
-
* Register a callback function to be called when a debug message has been
|
293
|
-
* received and is ready to be processed. For the debug messages to be
|
294
|
-
* processed V8 needs to be entered, and in certain embedding scenarios this
|
295
|
-
* callback can be used to make sure V8 is entered for the debug message to
|
296
|
-
* be processed. Note that debug messages will only be processed if there is
|
297
|
-
* a V8 break. This can happen automatically by using the option
|
298
|
-
* --debugger-auto-break.
|
299
|
-
* \param provide_locker requires that V8 acquires v8::Locker for you before
|
300
|
-
* calling handler
|
301
|
-
*/
|
302
|
-
static void SetDebugMessageDispatchHandler(
|
303
|
-
DebugMessageDispatchHandler handler, bool provide_locker = false);
|
304
|
-
|
305
|
-
/**
|
306
|
-
* Run a JavaScript function in the debugger.
|
307
|
-
* \param fun the function to call
|
308
|
-
* \param data passed as second argument to the function
|
309
|
-
* With this call the debugger is entered and the function specified is called
|
310
|
-
* with the execution state as the first argument. This makes it possible to
|
311
|
-
* get access to information otherwise not available during normal JavaScript
|
312
|
-
* execution e.g. details on stack frames. Receiver of the function call will
|
313
|
-
* be the debugger context global object, however this is a subject to change.
|
314
|
-
* The following example shows a JavaScript function which when passed to
|
315
|
-
* v8::Debug::Call will return the current line of JavaScript execution.
|
316
|
-
*
|
317
|
-
* \code
|
318
|
-
* function frame_source_line(exec_state) {
|
319
|
-
* return exec_state.frame(0).sourceLine();
|
320
|
-
* }
|
321
|
-
* \endcode
|
322
|
-
*/
|
323
|
-
static Local<Value> Call(v8::Handle<v8::Function> fun,
|
324
|
-
Handle<Value> data = Handle<Value>());
|
325
|
-
|
326
|
-
/**
|
327
|
-
* Returns a mirror object for the given object.
|
328
|
-
*/
|
329
|
-
static Local<Value> GetMirror(v8::Handle<v8::Value> obj);
|
330
|
-
|
331
|
-
/**
|
332
|
-
* Enable the V8 builtin debug agent. The debugger agent will listen on the
|
333
|
-
* supplied TCP/IP port for remote debugger connection.
|
334
|
-
* \param name the name of the embedding application
|
335
|
-
* \param port the TCP/IP port to listen on
|
336
|
-
* \param wait_for_connection whether V8 should pause on a first statement
|
337
|
-
* allowing remote debugger to connect before anything interesting happened
|
338
|
-
*/
|
339
|
-
static bool EnableAgent(const char* name, int port,
|
340
|
-
bool wait_for_connection = false);
|
341
|
-
|
342
|
-
/**
|
343
|
-
* Disable the V8 builtin debug agent. The TCP/IP connection will be closed.
|
344
|
-
*/
|
345
|
-
static void DisableAgent();
|
346
|
-
|
347
|
-
/**
|
348
|
-
* Makes V8 process all pending debug messages.
|
349
|
-
*
|
350
|
-
* From V8 point of view all debug messages come asynchronously (e.g. from
|
351
|
-
* remote debugger) but they all must be handled synchronously: V8 cannot
|
352
|
-
* do 2 things at one time so normal script execution must be interrupted
|
353
|
-
* for a while.
|
354
|
-
*
|
355
|
-
* Generally when message arrives V8 may be in one of 3 states:
|
356
|
-
* 1. V8 is running script; V8 will automatically interrupt and process all
|
357
|
-
* pending messages (however auto_break flag should be enabled);
|
358
|
-
* 2. V8 is suspended on debug breakpoint; in this state V8 is dedicated
|
359
|
-
* to reading and processing debug messages;
|
360
|
-
* 3. V8 is not running at all or has called some long-working C++ function;
|
361
|
-
* by default it means that processing of all debug messages will be deferred
|
362
|
-
* until V8 gets control again; however, embedding application may improve
|
363
|
-
* this by manually calling this method.
|
364
|
-
*
|
365
|
-
* It makes sense to call this method whenever a new debug message arrived and
|
366
|
-
* V8 is not already running. Method v8::Debug::SetDebugMessageDispatchHandler
|
367
|
-
* should help with the former condition.
|
368
|
-
*
|
369
|
-
* Technically this method in many senses is equivalent to executing empty
|
370
|
-
* script:
|
371
|
-
* 1. It does nothing except for processing all pending debug messages.
|
372
|
-
* 2. It should be invoked with the same precautions and from the same context
|
373
|
-
* as V8 script would be invoked from, because:
|
374
|
-
* a. with "evaluate" command it can do whatever normal script can do,
|
375
|
-
* including all native calls;
|
376
|
-
* b. no other thread should call V8 while this method is running
|
377
|
-
* (v8::Locker may be used here).
|
378
|
-
*
|
379
|
-
* "Evaluate" debug command behavior currently is not specified in scope
|
380
|
-
* of this method.
|
381
|
-
*/
|
382
|
-
static void ProcessDebugMessages();
|
383
|
-
|
384
|
-
/**
|
385
|
-
* Debugger is running in its own context which is entered while debugger
|
386
|
-
* messages are being dispatched. This is an explicit getter for this
|
387
|
-
* debugger context. Note that the content of the debugger context is subject
|
388
|
-
* to change.
|
389
|
-
*/
|
390
|
-
static Local<Context> GetDebugContext();
|
391
|
-
|
392
|
-
|
393
|
-
/**
|
394
|
-
* Enable/disable LiveEdit functionality for the given Isolate
|
395
|
-
* (default Isolate if not provided). V8 will abort if LiveEdit is
|
396
|
-
* unexpectedly used. LiveEdit is enabled by default.
|
397
|
-
*/
|
398
|
-
static void SetLiveEditEnabled(bool enable, Isolate* isolate = NULL);
|
399
|
-
};
|
400
|
-
|
401
|
-
|
402
|
-
} // namespace v8
|
403
|
-
|
404
|
-
|
405
|
-
#undef EXPORT
|
406
|
-
|
407
|
-
|
408
|
-
#endif // V8_V8_DEBUG_H_
|
@@ -1,118 +0,0 @@
|
|
1
|
-
// Copyright 2011 the V8 project authors. All rights reserved.
|
2
|
-
// Redistribution and use in source and binary forms, with or without
|
3
|
-
// modification, are permitted provided that the following conditions are
|
4
|
-
// met:
|
5
|
-
//
|
6
|
-
// * Redistributions of source code must retain the above copyright
|
7
|
-
// notice, this list of conditions and the following disclaimer.
|
8
|
-
// * Redistributions in binary form must reproduce the above
|
9
|
-
// copyright notice, this list of conditions and the following
|
10
|
-
// disclaimer in the documentation and/or other materials provided
|
11
|
-
// with the distribution.
|
12
|
-
// * Neither the name of Google Inc. nor the names of its
|
13
|
-
// contributors may be used to endorse or promote products derived
|
14
|
-
// from this software without specific prior written permission.
|
15
|
-
//
|
16
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
|
28
|
-
#ifndef PREPARSER_H
|
29
|
-
#define PREPARSER_H
|
30
|
-
|
31
|
-
#include "v8stdint.h"
|
32
|
-
|
33
|
-
#ifdef _WIN32
|
34
|
-
|
35
|
-
// Setup for Windows DLL export/import. When building the V8 DLL the
|
36
|
-
// BUILDING_V8_SHARED needs to be defined. When building a program which uses
|
37
|
-
// the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8
|
38
|
-
// static library or building a program which uses the V8 static library neither
|
39
|
-
// BUILDING_V8_SHARED nor USING_V8_SHARED should be defined.
|
40
|
-
#if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
|
41
|
-
#error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the\
|
42
|
-
build configuration to ensure that at most one of these is set
|
43
|
-
#endif
|
44
|
-
|
45
|
-
#ifdef BUILDING_V8_SHARED
|
46
|
-
#define V8EXPORT __declspec(dllexport)
|
47
|
-
#elif USING_V8_SHARED
|
48
|
-
#define V8EXPORT __declspec(dllimport)
|
49
|
-
#else
|
50
|
-
#define V8EXPORT
|
51
|
-
#endif // BUILDING_V8_SHARED
|
52
|
-
|
53
|
-
#else // _WIN32
|
54
|
-
|
55
|
-
// Setup for Linux shared library export. There is no need to distinguish
|
56
|
-
// between building or using the V8 shared library, but we should not
|
57
|
-
// export symbols when we are building a static library.
|
58
|
-
#if defined(__GNUC__) && ((__GNUC__ >= 4) || \
|
59
|
-
(__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(V8_SHARED)
|
60
|
-
#define V8EXPORT __attribute__ ((visibility("default")))
|
61
|
-
#else
|
62
|
-
#define V8EXPORT
|
63
|
-
#endif
|
64
|
-
|
65
|
-
#endif // _WIN32
|
66
|
-
|
67
|
-
|
68
|
-
namespace v8 {
|
69
|
-
|
70
|
-
// The result of preparsing is either a stack overflow error, or an opaque
|
71
|
-
// blob of data that can be passed back into the parser.
|
72
|
-
class V8EXPORT PreParserData {
|
73
|
-
public:
|
74
|
-
PreParserData(size_t size, const uint8_t* data)
|
75
|
-
: data_(data), size_(size) { }
|
76
|
-
|
77
|
-
// Create a PreParserData value where stack_overflow reports true.
|
78
|
-
static PreParserData StackOverflow() { return PreParserData(0, NULL); }
|
79
|
-
|
80
|
-
// Whether the pre-parser stopped due to a stack overflow.
|
81
|
-
// If this is the case, size() and data() should not be used.
|
82
|
-
bool stack_overflow() { return size_ == 0u; }
|
83
|
-
|
84
|
-
// The size of the data in bytes.
|
85
|
-
size_t size() const { return size_; }
|
86
|
-
|
87
|
-
// Pointer to the data.
|
88
|
-
const uint8_t* data() const { return data_; }
|
89
|
-
|
90
|
-
private:
|
91
|
-
const uint8_t* const data_;
|
92
|
-
const size_t size_;
|
93
|
-
};
|
94
|
-
|
95
|
-
|
96
|
-
// Interface for a stream of Unicode characters.
|
97
|
-
class V8EXPORT UnicodeInputStream { // NOLINT - Thinks V8EXPORT is class name.
|
98
|
-
public:
|
99
|
-
virtual ~UnicodeInputStream();
|
100
|
-
|
101
|
-
// Returns the next Unicode code-point in the input, or a negative value when
|
102
|
-
// there is no more input in the stream.
|
103
|
-
virtual int32_t Next() = 0;
|
104
|
-
};
|
105
|
-
|
106
|
-
|
107
|
-
// Preparse a JavaScript program. The source code is provided as a
|
108
|
-
// UnicodeInputStream. The max_stack_size limits the amount of stack
|
109
|
-
// space that the preparser is allowed to use. If the preparser uses
|
110
|
-
// more stack space than the limit provided, the result's stack_overflow()
|
111
|
-
// method will return true. Otherwise the result contains preparser
|
112
|
-
// data that can be used by the V8 parser to speed up parsing.
|
113
|
-
PreParserData V8EXPORT Preparse(UnicodeInputStream* input,
|
114
|
-
size_t max_stack_size);
|
115
|
-
|
116
|
-
} // namespace v8.
|
117
|
-
|
118
|
-
#endif // PREPARSER_H
|
@@ -1,105 +0,0 @@
|
|
1
|
-
// Copyright 2010 the V8 project authors. All rights reserved.
|
2
|
-
// Redistribution and use in source and binary forms, with or without
|
3
|
-
// modification, are permitted provided that the following conditions are
|
4
|
-
// met:
|
5
|
-
//
|
6
|
-
// * Redistributions of source code must retain the above copyright
|
7
|
-
// notice, this list of conditions and the following disclaimer.
|
8
|
-
// * Redistributions in binary form must reproduce the above
|
9
|
-
// copyright notice, this list of conditions and the following
|
10
|
-
// disclaimer in the documentation and/or other materials provided
|
11
|
-
// with the distribution.
|
12
|
-
// * Neither the name of Google Inc. nor the names of its
|
13
|
-
// contributors may be used to endorse or promote products derived
|
14
|
-
// from this software without specific prior written permission.
|
15
|
-
//
|
16
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
|
28
|
-
#ifndef V8_V8_TEST_H_
|
29
|
-
#define V8_V8_TEST_H_
|
30
|
-
|
31
|
-
#include "v8.h"
|
32
|
-
|
33
|
-
#ifdef _WIN32
|
34
|
-
// Setup for Windows DLL export/import. See v8.h in this directory for
|
35
|
-
// information on how to build/use V8 as a DLL.
|
36
|
-
#if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
|
37
|
-
#error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the\
|
38
|
-
build configuration to ensure that at most one of these is set
|
39
|
-
#endif
|
40
|
-
|
41
|
-
#ifdef BUILDING_V8_SHARED
|
42
|
-
#define V8EXPORT __declspec(dllexport)
|
43
|
-
#elif USING_V8_SHARED
|
44
|
-
#define V8EXPORT __declspec(dllimport)
|
45
|
-
#else
|
46
|
-
#define V8EXPORT
|
47
|
-
#endif
|
48
|
-
|
49
|
-
#else // _WIN32
|
50
|
-
|
51
|
-
// Setup for Linux shared library export. See v8.h in this directory for
|
52
|
-
// information on how to build/use V8 as shared library.
|
53
|
-
#if defined(__GNUC__) && ((__GNUC__ >= 4) || \
|
54
|
-
(__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(V8_SHARED)
|
55
|
-
#define V8EXPORT __attribute__ ((visibility("default")))
|
56
|
-
#else
|
57
|
-
#define V8EXPORT
|
58
|
-
#endif
|
59
|
-
|
60
|
-
#endif // _WIN32
|
61
|
-
|
62
|
-
|
63
|
-
/**
|
64
|
-
* Testing support for the V8 JavaScript engine.
|
65
|
-
*/
|
66
|
-
namespace v8 {
|
67
|
-
|
68
|
-
class V8EXPORT Testing {
|
69
|
-
public:
|
70
|
-
enum StressType {
|
71
|
-
kStressTypeOpt,
|
72
|
-
kStressTypeDeopt
|
73
|
-
};
|
74
|
-
|
75
|
-
/**
|
76
|
-
* Set the type of stressing to do. The default if not set is kStressTypeOpt.
|
77
|
-
*/
|
78
|
-
static void SetStressRunType(StressType type);
|
79
|
-
|
80
|
-
/**
|
81
|
-
* Get the number of runs of a given test that is required to get the full
|
82
|
-
* stress coverage.
|
83
|
-
*/
|
84
|
-
static int GetStressRuns();
|
85
|
-
|
86
|
-
/**
|
87
|
-
* Indicate the number of the run which is about to start. The value of run
|
88
|
-
* should be between 0 and one less than the result from GetStressRuns()
|
89
|
-
*/
|
90
|
-
static void PrepareStressRun(int run);
|
91
|
-
|
92
|
-
/**
|
93
|
-
* Force deoptimization of all functions.
|
94
|
-
*/
|
95
|
-
static void DeoptimizeAll();
|
96
|
-
};
|
97
|
-
|
98
|
-
|
99
|
-
} // namespace v8
|
100
|
-
|
101
|
-
|
102
|
-
#undef V8EXPORT
|
103
|
-
|
104
|
-
|
105
|
-
#endif // V8_V8_TEST_H_
|
@@ -1,54 +0,0 @@
|
|
1
|
-
// Copyright 2012 the V8 project authors. All rights reserved.
|
2
|
-
// Redistribution and use in source and binary forms, with or without
|
3
|
-
// modification, are permitted provided that the following conditions are
|
4
|
-
// met:
|
5
|
-
//
|
6
|
-
// * Redistributions of source code must retain the above copyright
|
7
|
-
// notice, this list of conditions and the following disclaimer.
|
8
|
-
// * Redistributions in binary form must reproduce the above
|
9
|
-
// copyright notice, this list of conditions and the following
|
10
|
-
// disclaimer in the documentation and/or other materials provided
|
11
|
-
// with the distribution.
|
12
|
-
// * Neither the name of Google Inc. nor the names of its
|
13
|
-
// contributors may be used to endorse or promote products derived
|
14
|
-
// from this software without specific prior written permission.
|
15
|
-
//
|
16
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
|
28
|
-
// Load definitions of standard types.
|
29
|
-
|
30
|
-
#ifndef V8STDINT_H_
|
31
|
-
#define V8STDINT_H_
|
32
|
-
|
33
|
-
#include <stddef.h>
|
34
|
-
#include <stdio.h>
|
35
|
-
|
36
|
-
#if defined(_WIN32) && !defined(__MINGW32__)
|
37
|
-
|
38
|
-
typedef signed char int8_t;
|
39
|
-
typedef unsigned char uint8_t;
|
40
|
-
typedef short int16_t; // NOLINT
|
41
|
-
typedef unsigned short uint16_t; // NOLINT
|
42
|
-
typedef int int32_t;
|
43
|
-
typedef unsigned int uint32_t;
|
44
|
-
typedef __int64 int64_t;
|
45
|
-
typedef unsigned __int64 uint64_t;
|
46
|
-
// intptr_t and friends are defined in crtdefs.h through stdio.h.
|
47
|
-
|
48
|
-
#else
|
49
|
-
|
50
|
-
#include <stdint.h>
|
51
|
-
|
52
|
-
#endif
|
53
|
-
|
54
|
-
#endif // V8STDINT_H_
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|