308 i::FLAG_log_code =
true;
313 if (result > 0 || argc != 2 || i::FLAG_help) {
314 ::printf(
"Usage: %s [flag] ... outfile\n", argv[0]);
316 return !i::FLAG_help;
325 #ifdef COMPRESS_STARTUP_DATA_BZ2
326 BZip2Decompressor natives_decompressor;
327 int bz2_result = natives_decompressor.Decompress();
328 if (bz2_result != BZ_OK) {
329 fprintf(stderr,
"bzip error code: %d\n", bz2_result);
333 i::FLAG_logfile_per_isolate =
false;
344 context.
Reset(isolate, Context::New(isolate));
349 "\nException thrown while compiling natives - see above.\n\n");
352 if (i::FLAG_extra_code !=
NULL) {
354 V8::SetCaptureStackTraceForUncaughtExceptions(
true, 100);
357 const char*
name = i::FLAG_extra_code;
360 fprintf(stderr,
"Failed to open '%s': errno %d\n",
name, errno);
364 fseek(
file, 0, SEEK_END);
368 char* chars =
new char[
size + 1];
370 for (
int i = 0;
i <
size;) {
371 int read =
static_cast<int>(fread(&chars[
i], 1,
size -
i,
file));
373 fprintf(stderr,
"Failed to read '%s': errno %d\n",
name, errno);
383 fprintf(stderr,
"Failure compiling '%s'\n",
name);
389 fprintf(stderr,
"Failure running '%s'\n",
name);
412 ser.SerializeStrongReferences();
417 context_ser.Serialize(&raw_context);
418 ser.SerializeWeakReferences();
422 if (i::FLAG_raw_file && i::FLAG_raw_context_file)
423 writer.SetRawFiles(i::FLAG_raw_file, i::FLAG_raw_context_file);
424 if (i::FLAG_startup_blob)
425 writer.SetStartupBlobFile(i::FLAG_startup_blob);
426 #ifdef COMPRESS_STARTUP_DATA_BZ2
427 BZip2Compressor bzip2;
428 writer.SetCompressor(&bzip2);
430 writer.WriteSnapshot(snapshot_data, ser, context_data, context_ser);
436 V8::ShutdownPlatform();
Stack-allocated class which sets the execution context for all operations executed within a local sco...
A stack-allocated class that governs a number of local handles.
Stack-allocated class which sets the isolate for all operations executed within a local scope.
Isolate represents an isolated instance of the V8 engine.
void Dispose()
Disposes the isolate.
static Isolate * New(const CreateParams ¶ms=CreateParams())
Creates a new isolate.
A light-weight stack-allocated object handle.
void Reset()
If non-empty, destroy the underlying storage cell IsEmpty() will return true after this call.
A PersistentBase which allows copy and assignment.
An external exception handler.
Local< v8::Message > Message() const
Returns the message associated with this exception.
bool HasCaught() const
Returns true if an exception has been caught by this try/catch block.
static v8::internal::Handle< v8::internal::Object > OpenPersistent(const v8::Persistent< T > &persistent)
static void InitializePlatform(Platform *platform)
Sets the v8::Platform to use.
static bool Initialize()
Initializes V8.
static void Probe(bool cross_compile)
static int SetFlagsFromCommandLine(int *argc, char **argv, bool remove_flags)
static const int kNoGCFlags
void CollectAllGarbage(int flags, const char *gc_reason=NULL, const GCCallbackFlags gc_callback_flags=kNoGCCallbackFlags)
Bootstrapper * bootstrapper()
static int GetBuiltinsCount()
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes A file to write the raw context snapshot bytes Write V8 startup blob file(mksnapshot only)") DEFINE_BOOL(profile_hydrogen_code_stub_compilation
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
void DumpException(Handle< Message > message)
bool InitializeICU(const char *icu_data_file)
static FILE * FOpen(const char *path, const char *mode)
Initial configuration parameters for a new Isolate.
bool enable_serializer
This flag currently renders the Isolate unusable.