36 : owns_data_(
false), data_(data), length_(length) {
38 byte* copy = NewArray<byte>(
length);
48 : flags_(kThisHasUses),
54 ast_value_factory_(
NULL),
55 ast_value_factory_owned_(
false) {
61 : flags_(kThisHasUses),
67 ast_value_factory_(
NULL),
68 ast_value_factory_owned_(
false) {
75 : flags_(kLazy | kThisHasUses),
76 shared_info_(shared_info),
82 ast_value_factory_(
NULL),
83 ast_value_factory_owned_(
false) {
89 : flags_(kLazy | kThisHasUses),
94 context_(closure->context()),
98 ast_value_factory_(
NULL),
99 ast_value_factory_owned_(
false) {
106 : flags_(kLazy | kThisHasUses),
107 source_stream_(
NULL),
110 optimization_id_(-1),
111 ast_value_factory_(
NULL),
112 ast_value_factory_owned_(
false) {
122 : flags_(kThisHasUses),
123 source_stream_(stream),
124 source_stream_encoding_(encoding),
127 optimization_id_(-1),
128 ast_value_factory_(
NULL),
129 ast_value_factory_owned_(
false) {
202 if (group_objects ==
NULL)
continue;
204 for (
int j = 0; j < group_objects->length(); j++) {
220 if (group_objects ==
NULL)
continue;
221 for (
int j = 0; j < group_objects->length(); j++) {
268 return FLAG_crankshaft &&
270 !
function()->dont_optimize() &&
280 int length =
function()->slot_count();
295 #define DEF_VISIT(type) \
296 virtual void Visit##type(type* node) OVERRIDE { \
297 if (node->position() != RelocInfo::kNoPosition) { \
298 SetSourcePosition(node->position()); \
300 HOptimizedGraphBuilder::Visit##type(node); \
305 #define DEF_VISIT(type) \
306 virtual void Visit##type(type* node) OVERRIDE { \
307 if (node->position() != RelocInfo::kNoPosition) { \
308 SetSourcePosition(node->position()); \
310 HOptimizedGraphBuilder::Visit##type(node); \
315 #define DEF_VISIT(type) \
316 virtual void Visit##type(type* node) OVERRIDE { \
317 HOptimizedGraphBuilder::Visit##type(node); \
331 DCHECK(!
info()->shared_info()->optimization_disabled());
334 if (
isolate()->DebuggerHasBreakPoints()) {
340 const int kMaxOptCount =
341 FLAG_deopt_every_n_times == 0 ? FLAG_max_opt_count : 1000;
342 if (
info()->opt_count() > kMaxOptCount) {
360 if (
info()->is_osr() &&
370 if (!
info()->closure()->PassesFilter(FLAG_hydrogen_filter)) {
379 bool should_recompile = !
info()->
shared_info()->has_deoptimization_support();
380 if (should_recompile || FLAG_hydrogen_stats) {
381 base::ElapsedTimer timer;
382 if (FLAG_hydrogen_stats) {
388 if (FLAG_hydrogen_stats) {
393 DCHECK(
info()->shared_info()->has_deoptimization_support());
396 if ((FLAG_turbo_asm &&
info()->shared_info()->asm_function()) ||
397 info()->closure()->PassesFilter(FLAG_turbo_filter)) {
400 if (!
info()->code().is_null()) {
401 if (FLAG_turbo_deoptimization) {
402 info()->
context()->native_context()->AddOptimizedCode(*
info()->code());
408 if (FLAG_trace_hydrogen) {
410 PrintF(
"-----------------------------------------------------------\n");
411 PrintF(
"Compiling method %s using hydrogen\n",
name->ToCString().get());
426 if (
isolate()->has_pending_exception()) {
432 if (
info()->HasAbortedDueToDependencyChange()) {
449 if (!
info()->code().is_null()) {
457 if (
graph_->Optimize(&bailout_reason)) {
460 }
else if (bailout_reason != kNoReason) {
471 if (!
info()->code().is_null()) {
476 DCHECK(!
info()->HasAbortedDueToDependencyChange());
489 if (optimized_code.
is_null()) {
490 if (
info()->bailout_reason() == kNoReason) {
499 info()->
context()->native_context()->AddOptimizedCode(*
info()->code());
506 if (!function->IsOptimized()) {
508 int opt_count =
function->shared()->opt_count();
509 function->shared()->set_opt_count(opt_count + 1);
514 if (FLAG_trace_opt) {
516 function->ShortPrint();
517 PrintF(
" - took %0.3f, %0.3f, %0.3f ms]\n", ms_creategraph, ms_optimize,
520 if (FLAG_trace_opt_stats) {
521 static double compilation_time = 0.0;
522 static int compiled_functions = 0;
523 static int code_size = 0;
525 compilation_time += (ms_creategraph + ms_optimize + ms_codegen);
526 compiled_functions++;
527 code_size +=
function->shared()->SourceSize();
528 PrintF(
"Compiled: %d functions with %d byte source size in %fms.\n",
533 if (FLAG_hydrogen_stats) {
546 if (estimate == 0) estimate = 2;
551 if (shared->GetIsolate()->serializer_enabled()) {
553 }
else if (FLAG_clever_optimizations) {
561 shared->set_expected_nof_properties(estimate);
570 FunctionLiteral* lit,
573 function_info->set_length(lit->parameter_count());
574 function_info->set_formal_parameter_count(lit->parameter_count());
575 function_info->set_script(*script);
576 function_info->set_function_token_position(lit->function_token_position());
577 function_info->set_start_position(lit->start_position());
578 function_info->set_end_position(lit->end_position());
579 function_info->set_is_expression(lit->is_expression());
580 function_info->set_is_anonymous(lit->is_anonymous());
582 function_info->set_inferred_name(*lit->inferred_name());
583 function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation());
584 function_info->set_allows_lazy_compilation_without_context(
585 lit->AllowsLazyCompilationWithoutContext());
586 function_info->set_strict_mode(lit->strict_mode());
587 function_info->set_uses_arguments(lit->scope()->arguments() !=
NULL);
588 function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
589 function_info->set_ast_node_count(lit->ast_node_count());
590 function_info->set_is_function(lit->is_function());
591 function_info->set_bailout_reason(lit->dont_optimize_reason());
592 function_info->set_dont_cache(lit->flags()->Contains(
kDontCache));
593 function_info->set_kind(lit->kind());
594 function_info->set_asm_function(lit->scope()->asm_function());
611 if (code.is_identical_to(info->
isolate()->
builtins()->CompileLazy())) {
617 String* script_name = script->name()->IsString()
618 ? String::cast(script->name())
622 CodeCreateEvent(log_tag, *code, *shared, info, script_name,
623 line_num, column_num));
651 PostponeInterruptsScope postpone(info->
isolate());
656 FunctionLiteral* lit = info->
function();
657 shared->set_strict_mode(lit->strict_mode());
659 shared->set_bailout_reason(lit->dont_optimize_reason());
660 shared->set_ast_node_count(lit->ast_node_count());
671 shared->set_scope_info(*scope_info);
674 shared->ReplaceCode(*info->
code());
675 if (shared->optimization_disabled()) info->
code()->set_optimizable(
false);
684 if (FLAG_cache_optimized_code) {
689 int index = shared->SearchOptimizedCodeMap(
690 function->context()->native_context(), osr_ast_id);
692 if (FLAG_trace_opt) {
693 PrintF(
"[found optimized code for ");
694 function->ShortPrint();
695 if (!osr_ast_id.
IsNone()) {
702 return Handle<Code>(shared->GetCodeFromOptimizedCodeMap(index));
711 if (code->kind() != Code::OPTIMIZED_FUNCTION)
return;
717 if (FLAG_cache_optimized_code) {
721 if (shared->bound())
return;
748 if (FLAG_trace_opt) {
749 PrintF(
"[aborted optimizing ");
761 if (FLAG_trace_opt) {
762 PrintF(
"[completed optimizing ");
773 if (FLAG_trace_concurrent_recompilation) {
774 PrintF(
" ** Compilation queue full, will retry optimizing ");
781 CompilationHandleScope handle_scope(info);
792 if (FLAG_trace_concurrent_recompilation) {
798 PrintF(
" for concurrent optimization.\n");
806 DCHECK(!function->GetIsolate()->has_pending_exception());
807 DCHECK(!function->is_compiled());
808 if (function->shared()->is_compiled()) {
822 DCHECK(!function->GetIsolate()->has_pending_exception());
823 DCHECK(!function->is_compiled());
825 if (FLAG_turbo_asm && function->shared()->asm_function()) {
829 PostponeInterruptsScope postpone(info.
isolate());
841 if (function->shared()->is_compiled()) {
850 if (FLAG_always_opt &&
868 DCHECK(!shared->GetIsolate()->has_pending_exception());
869 DCHECK(!shared->is_compiled());
878 if (function->is_compiled())
return true;
881 if (!maybe_code.ToHandle(&code)) {
883 function->GetIsolate()->clear_pending_exception();
887 function->ReplaceCode(*code);
888 DCHECK(function->is_compiled());
896 if (!info->
shared_info()->has_deoptimization_support()) {
907 shared->EnableDeoptimizationSupport(*unoptimized.
code());
915 shared->set_scope_info(*target_scope_info);
943 DCHECK(old_code->kind() == Code::FUNCTION);
944 DCHECK(!old_code->has_debug_break_slots());
947 if (old_code->is_compiled_optimizable()) {
954 if (!maybe_new_code.ToHandle(&new_code)) {
957 DCHECK_EQ(old_code->is_compiled_optimizable(),
958 new_code->is_compiled_optimizable());
960 return maybe_new_code;
967 PostponeInterruptsScope postpone(info.
isolate());
986 PostponeInterruptsScope postpone(isolate);
992 script->set_context_data(array->
get(0));
1006 bool parse_allow_lazy =
1008 String::cast(script->source())->length() >
1009 FLAG_min_preparse_length) &&
1012 if (!parse_allow_lazy &&
1026 FunctionLiteral* lit = info->
function();
1035 HistogramTimerScope timer(rate);
1044 result = isolate->
factory()->NewSharedFunctionInfo(
1045 lit->name(), lit->materialized_literal_count(), lit->kind(),
1054 : isolate->
factory()->empty_string();
1057 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script);
1059 PROFILE(isolate, CodeCreateEvent(
1060 log_tag, *info->
code(), *result, info, *script_name));
1061 GDBJIT(AddCode(script_name, script, info->
code(), info));
1067 lit->expected_property_count());
1086 int scope_position) {
1087 Isolate* isolate = source->GetIsolate();
1088 int source_length = source->length();
1089 isolate->
counters()->total_eval_size()->Increment(source_length);
1090 isolate->
counters()->total_compile_size()->Increment(source_length);
1094 compilation_cache->
LookupEval(source, context, strict_mode,
1098 if (!maybe_shared_info.ToHandle(&shared_info)) {
1116 shared_info->DisableOptimization(kEval);
1120 if (!shared_info->dont_cache()) {
1122 source, context, shared_info, scope_position);
1129 return isolate->
factory()->NewFunctionFromSharedFunctionInfo(
1136 int column_offset,
bool is_shared_cross_origin,
Handle<Context> context,
1143 DCHECK(cached_data && !*cached_data);
1148 DCHECK(cached_data && *cached_data);
1151 Isolate* isolate = source->GetIsolate();
1152 int source_length = source->length();
1153 isolate->
counters()->total_load_size()->Increment(source_length);
1154 isolate->
counters()->total_compile_size()->Increment(source_length);
1161 if (extension ==
NULL) {
1162 if (FLAG_serialize_toplevel &&
1165 HistogramTimerScope timer(isolate->
counters()->compile_deserialize());
1169 source, script_name, line_offset, column_offset,
1170 is_shared_cross_origin, context);
1174 base::ElapsedTimer timer;
1175 if (FLAG_profile_deserialization && FLAG_serialize_toplevel &&
1180 if (!maybe_result.ToHandle(&result)) {
1189 script->set_name(*script_name);
1191 script->set_column_offset(
Smi::FromInt(column_offset));
1193 script->set_is_shared_cross_origin(is_shared_cross_origin);
1201 if (FLAG_serialize_toplevel &&
1208 if (extension ==
NULL && !result.
is_null() && !result->dont_cache()) {
1209 compilation_cache->
PutScript(source, context, result);
1210 if (FLAG_serialize_toplevel &&
1212 HistogramTimerScope histogram_timer(
1213 isolate->
counters()->compile_serialize());
1215 if (FLAG_profile_deserialization) {
1216 PrintF(
"[Compiling and serializing %d bytes took %0.3f ms]\n",
1217 (*cached_data)->length(), timer.Elapsed().InMillisecondsF());
1233 isolate->
counters()->total_load_size()->Increment(source_length);
1234 isolate->
counters()->total_compile_size()->Increment(source_length);
1254 Factory* factory = isolate->
factory();
1265 bool allow_lazy_without_ctx = literal->AllowsLazyCompilationWithoutContext();
1266 bool allow_lazy = literal->AllowsLazyCompilation() &&
1278 if (FLAG_lazy && allow_lazy && !literal->is_parenthesized()) {
1291 literal->name(), literal->materialized_literal_count(), literal->kind(),
1295 result->set_allows_lazy_compilation(allow_lazy);
1296 result->set_allows_lazy_compilation_without_context(allow_lazy_without_ctx);
1301 literal->expected_property_count());
1313 function, osr_ast_id).ToHandle(&cached_code)) {
1318 Isolate* isolate = info->isolate();
1319 DCHECK(AllowCompilation::IsAllowed(isolate));
1322 PostponeInterruptsScope postpone(isolate);
1325 if (shared->code()->kind() != Code::FUNCTION ||
1334 shared->ReplaceCode(*current_code);
1336 current_code->set_profiler_ticks(0);
1338 info->SetOptimizing(osr_ast_id, current_code);
1343 return isolate->
builtins()->InOptimizationQueue();
1358 Isolate* isolate = info->isolate();
1364 shared->code()->set_profiler_ticks(0);
1373 if (shared->optimization_disabled()) {
1375 }
else if (info->HasAbortedDueToDependencyChange()) {
1381 if (info->shared_info()->SearchOptimizedCodeMap(
1382 info->context()->native_context(), info->osr_ast_id()) == -1) {
1385 if (FLAG_trace_opt) {
1386 PrintF(
"[completed optimizing ");
1387 info->closure()->ShortPrint();
1395 if (FLAG_trace_opt) {
1396 PrintF(
"[aborted optimizing ");
1397 info->closure()->ShortPrint();
1405 bool allow_lazy_without_ctx) {
1412 : name_(
name), info_(info), zone_(info->isolate()) {
1413 if (FLAG_hydrogen_stats) {
1420 CompilationPhase::~CompilationPhase() {
1421 if (FLAG_hydrogen_stats) {
1422 unsigned size = zone()->allocation_size();
1423 size += info_->zone()->allocation_size() - info_zone_start_allocation_size_;
1424 isolate()->GetHStatistics()->SaveTiming(name_, timer_.Elapsed(),
size);
1429 bool CompilationPhase::ShouldProduceTraceOutput()
const {
1433 bool tracing_on = info()->
IsStub()
1434 ? FLAG_trace_hydrogen_stubs
1435 : (FLAG_trace_hydrogen &&
1436 info()->
closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1437 return (tracing_on &&
#define STATEMENT_NODE_LIST(V)
#define EXPRESSION_NODE_LIST(V)
#define MODULE_NODE_LIST(V)
#define DECLARATION_NODE_LIST(V)
For streaming incomplete script data to V8.
static char * StrChr(char *str, int c)
static void Run(CompilationInfo *info)
static ScriptData * Serialize(Isolate *isolate, Handle< SharedFunctionInfo > info, Handle< String > source)
static Handle< SharedFunctionInfo > Deserialize(Isolate *isolate, ScriptData *data, Handle< String > source)
static Flags ComputeFlags(Kind kind, InlineCacheState ic_state=UNINITIALIZED, ExtraICState extra_ic_state=kNoExtraICState, StubType type=NORMAL, CacheHolderFlag holder=kCacheOnReceiver)
static const int kPrologueOffsetNotSet
void PutEval(Handle< String > source, Handle< Context > context, Handle< SharedFunctionInfo > function_info, int scope_position)
MaybeHandle< SharedFunctionInfo > LookupScript(Handle< String > source, Handle< Object > name, int line_offset, int column_offset, bool is_shared_cross_origin, Handle< Context > context)
MaybeHandle< SharedFunctionInfo > LookupEval(Handle< String > source, Handle< Context > context, StrictMode strict_mode, int scope_position)
void PutScript(Handle< String > source, Handle< Context > context, Handle< SharedFunctionInfo > function_info)
v8::Extension * extension_
void PrepareForSerializing()
Handle< Foreign > object_wrapper_
bool is_context_specializing() const
void SetCode(Handle< Code > code)
List< OffsetRange > * no_frame_ranges_
virtual ~CompilationInfo()
BailoutId osr_ast_id() const
void MarkCompilingForDebugging()
void SetCachedData(ScriptData **cached_data, ScriptCompiler::CompileOptions compile_options)
BailoutReason bailout_reason() const
bool GetFlag(Flag flag) const
void EnableDeoptimizationSupport()
ScriptCompiler::CompileOptions compile_options_
ZoneList< Handle< HeapObject > > * dependencies_[DependentCode::kGroupCount]
HydrogenCodeStub * code_stub() const
bool ast_value_factory_owned_
Handle< Code > code() const
bool ShouldSelfOptimize()
void PrepareForCompilation(Scope *scope)
ScriptCompiler::CompileOptions compile_options() const
Code::Flags flags() const
void MarkNonOptimizable()
void MarkAsTypingEnabled()
void MarkAsInliningEnabled()
int num_parameters() const
BailoutReason bailout_reason_
void SetExtension(v8::Extension *extension)
Handle< Script > script() const
Handle< Context > context() const
void MarkAsContextSpecializing()
HydrogenCodeStub * code_stub_
Handle< TypeFeedbackVector > feedback_vector_
Handle< SharedFunctionInfo > shared_info_
void SetFunction(FunctionLiteral *literal)
void SetOptimizing(BailoutId osr_ast_id, Handle< Code > unoptimized)
DeferredHandles * deferred_handles_
void SetStrictMode(StrictMode strict_mode)
void set_this_has_uses(bool has_no_uses)
void SetContext(Handle< Context > context)
bool will_serialize() const
void CommitDependencies(Handle< Code > code)
FunctionLiteral * function() const
ScriptData ** cached_data_
void RollbackDependencies()
Handle< JSFunction > closure() const
StrictMode strict_mode() const
void SetParseRestriction(ParseRestriction restriction)
int num_heap_slots() const
Isolate * isolate() const
Handle< TypeFeedbackVector > feedback_vector() const
Handle< SharedFunctionInfo > shared_info() const
void Initialize(Isolate *isolate, Mode mode, Zone *zone)
AstValueFactory * ast_value_factory_
FunctionLiteral * function_
void MarkAsInliningDisabled()
@ kDisableFutureOptimization
CompilationInfo(Handle< JSFunction > closure, Zone *zone)
static MUST_USE_RESULT MaybeHandle< JSFunction > GetFunctionFromEval(Handle< String > source, Handle< Context > context, StrictMode strict_mode, ParseRestriction restriction, int scope_position)
static Handle< SharedFunctionInfo > CompileStreamedScript(CompilationInfo *info, int source_length)
static bool EnsureDeoptimizationSupport(CompilationInfo *info)
static MUST_USE_RESULT MaybeHandle< Code > GetDebugCode(Handle< JSFunction > function)
static MUST_USE_RESULT MaybeHandle< Code > GetOptimizedCode(Handle< JSFunction > function, Handle< Code > current_code, ConcurrencyMode mode, BailoutId osr_ast_id=BailoutId::None())
static MUST_USE_RESULT MaybeHandle< Code > GetLazyCode(Handle< JSFunction > function)
static bool DebuggerWantsEagerCompilation(CompilationInfo *info, bool allow_lazy_without_ctx=false)
static Handle< Code > GetConcurrentlyOptimizedCode(OptimizedCompileJob *job)
static bool EnsureCompiled(Handle< JSFunction > function, ClearExceptionFlag flag)
static MUST_USE_RESULT MaybeHandle< Code > GetUnoptimizedCode(Handle< JSFunction > function)
static void CompileForLiveEdit(Handle< Script > script)
static Handle< SharedFunctionInfo > CompileScript(Handle< String > source, Handle< Object > script_name, int line_offset, int column_offset, bool is_shared_cross_origin, Handle< Context > context, v8::Extension *extension, ScriptData **cached_data, ScriptCompiler::CompileOptions compile_options, NativesFlag is_natives_code)
static Handle< SharedFunctionInfo > BuildFunctionInfo(FunctionLiteral *node, Handle< Script > script, CompilationInfo *outer)
static void RecordEvalCaller(Handle< Script > script)
void OnAfterCompile(Handle< Script > script)
void OnBeforeCompile(Handle< Script > script)
static const int kGroupCount
static DependentCode * ForObject(Handle< HeapObject > object, DependencyGroup group)
static bool MakeCode(CompilationInfo *info)
HOptimizedGraphBuilderWithPositions(CompilationInfo *info)
void Bailout(BailoutReason reason)
static Handle< T > null()
bool DebuggerHasBreakPoints()
Handle< Context > native_context()
void ReportPendingMessages()
OptimizingCompilerThread * optimizing_compiler_thread()
HStatistics * GetHStatistics()
bool use_crankshaft() const
void clear_pending_exception()
CompilationCache * compilation_cache()
CpuProfiler * cpu_profiler() const
bool has_pending_exception()
static LChunk * NewChunk(HGraph *graph)
static const int kMinFixedSlotIndex
static const int kMaxFixedSlotIndex
void RecordRootFunctionInfo(Handle< Code > code)
static bool IsActive(Isolate *isolate)
void RecordFunctionInfo(Handle< SharedFunctionInfo > info, FunctionLiteral *lit, Zone *zone)
bool is_logging_code_events()
Isolate * isolate() const
void RecordOptimizationStats()
MUST_USE_RESULT Status OptimizeGraph()
MUST_USE_RESULT Status GenerateCode()
Status AbortOptimization(BailoutReason reason)
Status last_status() const
HOptimizedGraphBuilder * graph_builder_
CompilationInfo * info() const
base::TimeDelta time_taken_to_create_graph_
Status RetryOptimization(BailoutReason reason)
MUST_USE_RESULT Status SetLastStatus(Status status)
base::TimeDelta time_taken_to_optimize_
MUST_USE_RESULT Status CreateGraph()
base::TimeDelta time_taken_to_codegen_
void QueueForOptimization(OptimizedCompileJob *optimizing_compiler)
static const int kNoPosition
static bool Rewrite(CompilationInfo *info)
static Handle< ScopeInfo > Create(Scope *scope, Zone *zone)
static ScopeInfo * Empty(Isolate *isolate)
int num_heap_slots() const
static bool Analyze(CompilationInfo *info)
int num_parameters() const
bool HasIllegalRedeclaration() const
bool AllowsLazyCompilation() const
int num_stack_slots() const
void AcquireDataOwnership()
const byte * data() const
ScriptData(const byte *data, int length)
@ COMPILATION_STATE_COMPILED
static int GetColumnNumber(Handle< Script > script, int code_pos)
static int GetLineNumber(Handle< Script > script, int code_pos)
static void AddToOptimizedCodeMap(Handle< SharedFunctionInfo > shared, Handle< Context > native_context, Handle< Code > code, Handle< FixedArray > literals, BailoutId osr_ast_id)
static Smi * FromInt(int value)
unsigned allocation_size() const
Handle< Code > GenerateCode()
#define PROFILE(IsolateGetter, Call)
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 literals(0o77, 0b11)") DEFINE_BOOL(harmony_object_literals
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 mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
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
#define ASSIGN_RETURN_ON_EXCEPTION(isolate, dst, call, T)
#define CHECK_EQ(expected, value)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
static bool CompileOptimizedPrologue(CompilationInfo *info)
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit is_toplevel
static MUST_USE_RESULT MaybeHandle< Code > GetCodeFromOptimizedCodeMap(Handle< JSFunction > function, BailoutId osr_ast_id)
static void SetFunctionInfo(Handle< SharedFunctionInfo > function_info, FunctionLiteral *lit, bool is_toplevel, Handle< Script > script)
PerThreadAssertScopeDebugOnly< HANDLE_DEREFERENCE_ASSERT, true > AllowHandleDereference
static bool GetOptimizedCodeNow(CompilationInfo *info)
static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, CompilationInfo *info, Handle< SharedFunctionInfo > shared)
const char * GetBailoutReason(BailoutReason reason)
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset dependent_code
void PrintF(const char *format,...)
void SetExpectedNofPropertiesFromEstimate(Handle< SharedFunctionInfo > shared, int estimate)
kFeedbackVectorOffset flag
static Handle< SharedFunctionInfo > CompileToplevel(CompilationInfo *info)
static bool GetOptimizedCodeLater(CompilationInfo *info)
bool IsAligned(T value, U alignment)
const intptr_t kPointerAlignment
void CopyBytes(uint8_t *target, uint8_t *source)
static void InsertCodeIntoOptimizedCodeMap(CompilationInfo *info)
static bool CompileUnoptimizedCode(CompilationInfo *info)
static MUST_USE_RESULT MaybeHandle< Code > GetUnoptimizedCodeCommon(CompilationInfo *info)
Debugger support for the V8 JavaScript engine.