55 : isolate_(script->GetIsolate()),
62 pre_parse_data_(
NULL),
65 deferred_handles_(
NULL) {
72 : isolate_(shared_info->GetIsolate()),
74 IsLazy::encode(
true)),
78 shared_info_(shared_info),
81 pre_parse_data_(
NULL),
84 deferred_handles_(
NULL) {
90 : isolate_(closure->GetIsolate()),
92 IsLazy::encode(
true)),
100 pre_parse_data_(
NULL),
101 context_(closure->context()),
104 deferred_handles_(
NULL) {
110 delete deferred_handles_;
116 bool is_optimizable_closure =
117 FLAG_optimize_closures &&
118 closure_.is_null() &&
122 SetMode(is_optimizable_closure ? BASE : NONOPT);
130 return FLAG_self_optimization &&
153 static bool IsDebuggerActive(
Isolate* isolate) {
154 #ifdef ENABLE_DEBUGGER_SUPPORT
156 isolate->debug()->has_break_points() :
164 static bool AlwaysFullCompiler(
Isolate* isolate) {
165 return FLAG_always_full_compiler || IsDebuggerActive(isolate);
169 void OptimizingCompiler::RecordOptimizationStats() {
171 int opt_count =
function->shared()->opt_count();
172 function->shared()->set_opt_count(opt_count + 1);
173 double ms_creategraph =
174 static_cast<double>(time_taken_to_create_graph_) / 1000;
175 double ms_optimize =
static_cast<double>(time_taken_to_optimize_) / 1000;
176 double ms_codegen =
static_cast<double>(time_taken_to_codegen_) / 1000;
177 if (FLAG_trace_opt) {
179 function->PrintName();
181 PrintF(
" - took %0.3f, %0.3f, %0.3f ms]\n", ms_creategraph, ms_optimize,
184 if (FLAG_trace_opt_stats) {
185 static double compilation_time = 0.0;
186 static int compiled_functions = 0;
187 static int code_size = 0;
189 compilation_time += (ms_creategraph + ms_optimize + ms_codegen);
190 compiled_functions++;
191 code_size +=
function->shared()->SourceSize();
192 PrintF(
"Compiled: %d functions with %d byte source size in %fms.\n",
202 static bool MakeCrankshaftCode(CompilationInfo* info) {
203 OptimizingCompiler compiler(info);
209 status = compiler.OptimizeGraph();
211 status = compiler.AbortOptimization();
214 status = compiler.GenerateAndInstallCode();
227 ASSERT(code->kind() == Code::FUNCTION);
231 ASSERT(!
info()->shared_info()->optimization_disabled());
236 if (AlwaysFullCompiler(
info()->isolate())) {
243 const int kMaxOptCount =
244 FLAG_deopt_every_n_times == 0 ? FLAG_max_opt_count : 1000;
245 if (
info()->shared_info()->opt_count() > kMaxOptCount) {
265 if (!
info()->osr_ast_id().IsNone() &&
273 if (*FLAG_hydrogen_filter !=
'\0') {
275 if ((filter[0] ==
'-'
277 || (filter[0] !=
'-' && !name->IsEqualTo(filter))) {
287 Timer t(
this, &time_taken_to_create_graph_);
288 bool should_recompile = !
info()->
shared_info()->has_deoptimization_support();
289 if (should_recompile || FLAG_hydrogen_stats) {
290 HPhase phase(HPhase::kFullCodeGen);
299 if (should_recompile) {
300 if (!succeeded)
return SetLastStatus(
FAILED);
302 shared->EnableDeoptimizationSupport(*unoptimized.
code());
305 Logger::LAZY_COMPILE_TAG, &unoptimized, shared);
314 ASSERT(FLAG_always_opt || code->optimizable());
315 ASSERT(
info()->shared_info()->has_deoptimization_support());
317 if (FLAG_trace_hydrogen) {
318 PrintF(
"-----------------------------------------------------------\n");
319 PrintF(
"Compiling method %s using hydrogen\n", *name->ToCString());
323 info()->closure()->context()->native_context());
327 HPhase phase(HPhase::kTotal);
330 if (
info()->isolate()->has_pending_exception()) {
332 return SetLastStatus(
FAILED);
339 if (graph_ ==
NULL) {
353 NoHandleAllocation no_handles;
356 Timer t(
this, &time_taken_to_optimize_);
359 if (!graph_->
Optimize(&bailout_reason)) {
360 if (!bailout_reason.
is_empty()) graph_builder_->
Bailout(*bailout_reason);
364 if (chunk_ ==
NULL) {
374 Timer timer(
this, &time_taken_to_codegen_);
378 if (optimized_code.
is_null()) {
383 RecordOptimizationStats();
393 return MakeCrankshaftCode(info);
405 static bool MakeCode(CompilationInfo* info) {
413 #ifdef ENABLE_DEBUGGER_SUPPORT
414 bool Compiler::MakeCodeForLiveEdit(CompilationInfo* info) {
417 bool succeeded = MakeCode(info);
418 if (!info->shared_info().is_null()) {
421 info->shared_info()->set_scope_info(*scope_info);
428 static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) {
429 Isolate* isolate = info->isolate();
431 PostponeInterruptsScope postpone(isolate);
433 ASSERT(!isolate->native_context().is_null());
434 Handle<Script> script = info->script();
435 script->set_context_data((*isolate->native_context())->data());
437 #ifdef ENABLE_DEBUGGER_SUPPORT
438 if (info->is_eval()) {
440 script->set_compilation_type(
Smi::FromInt(compilation_type));
443 if (info->is_eval()) {
444 StackTraceFrameIterator it(isolate);
446 script->set_eval_from_shared(
448 Code*
code = it.frame()->LookupCode();
449 int offset =
static_cast<int>(
450 it.frame()->pc() - code->instruction_start());
451 script->set_eval_from_instructions_offset(
Smi::FromInt(offset));
457 isolate->debugger()->OnBeforeCompile(script);
461 ASSERT(info->is_eval() || info->is_global());
463 if (info->pre_parse_data() !=
NULL ||
464 String::cast(script->source())->length() > FLAG_min_preparse_length) {
474 HistogramTimer* rate = info->is_eval()
475 ? info->isolate()->counters()->compile_eval()
476 : info->isolate()->counters()->compile();
477 HistogramTimerScope timer(rate);
480 FunctionLiteral* lit = info->function();
481 LiveEditFunctionTracker live_edit_tracker(isolate, lit);
482 if (!MakeCode(info)) {
483 if (!isolate->has_pending_exception()) isolate->StackOverflow();
488 ASSERT(!info->code().is_null());
489 Handle<SharedFunctionInfo> result =
490 isolate->factory()->NewSharedFunctionInfo(
492 lit->materialized_literal_count(),
496 ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position());
499 if (script->name()->IsString()) {
500 PROFILE(isolate, CodeCreateEvent(
503 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script),
512 PROFILE(isolate, CodeCreateEvent(
515 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script),
518 isolate->heap()->empty_string()));
519 GDBJIT(AddCode(Handle<String>(), script, info->code(), info));
527 script->set_compilation_state(
530 #ifdef ENABLE_DEBUGGER_SUPPORT
532 isolate->debugger()->OnAfterCompile(
533 script, Debugger::NO_AFTER_COMPILE_FLAGS);
536 live_edit_tracker.RecordFunctionInfo(result, lit, info->zone());
551 Isolate* isolate = source->GetIsolate();
552 int source_length = source->length();
553 isolate->
counters()->total_load_size()->Increment(source_length);
554 isolate->
counters()->total_compile_size()->Increment(source_length);
557 VMState state(isolate, COMPILER);
563 if (extension ==
NULL) {
587 script->set_name(*script_name);
592 script->set_data(script_data.
is_null() ?
HEAP->undefined_value()
601 if (FLAG_use_strict) {
604 result = MakeFunctionInfo(&info);
605 if (extension ==
NULL && !result.
is_null() && !result->dont_cache()) {
606 compilation_cache->
PutScript(source, context, result);
609 if (result->ic_age() !=
HEAP->global_ic_age()) {
610 result->ResetForNewContext(
HEAP->global_ic_age());
623 int scope_position) {
624 Isolate* isolate = source->GetIsolate();
625 int source_length = source->length();
626 isolate->
counters()->total_eval_size()->Increment(source_length);
627 isolate->
counters()->total_compile_size()->Increment(source_length);
630 VMState state(isolate, COMPILER);
636 result = compilation_cache->
LookupEval(source,
650 result = MakeFunctionInfo(&info);
654 result->DisableOptimization(
"eval");
663 result->is_extended_mode());
664 if (!result->dont_cache()) {
666 source, context, is_global, result, scope_position);
670 if (result->ic_age() !=
HEAP->global_ic_age()) {
671 result->ResetForNewContext(
HEAP->global_ic_age());
690 shared->set_scope_info(*scope_info);
691 shared->set_code(*code);
692 if (!
function.is_null()) {
693 function->ReplaceCode(*code);
694 ASSERT(!function->IsOptimized());
698 FunctionLiteral* lit = info->
function();
705 shared->SetThisPropertyAssignmentsInfo(
706 lit->has_only_simple_this_property_assignments(),
707 *lit->this_property_assignments());
710 ASSERT(shared->is_compiled());
711 shared->set_code_age(0);
712 shared->set_dont_optimize(lit->flags()->Contains(
kDontOptimize));
713 shared->set_dont_inline(lit->flags()->Contains(
kDontInline));
714 shared->set_ast_node_count(lit->ast_node_count());
717 !
function.is_null() &&
718 !shared->optimization_disabled()) {
722 if (FLAG_always_opt &&
723 !Isolate::Current()->DebuggerHasBreakPoints()) {
724 CompilationInfoWithZone optimized(
function);
733 static void InstallCodeCommon(CompilationInfo* info) {
734 Handle<SharedFunctionInfo> shared = info->shared_info();
735 Handle<Code> code = info->code();
741 if (shared->optimization_disabled()) code->set_optimizable(
false);
747 static void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) {
748 Handle<Code> code = info->code();
749 if (FLAG_cache_optimized_code &&
750 info->osr_ast_id().IsNone() &&
751 code->kind() == Code::OPTIMIZED_FUNCTION) {
752 Handle<JSFunction>
function = info->closure();
753 Handle<SharedFunctionInfo> shared(function->shared());
754 Handle<FixedArray> literals(function->literals());
755 Handle<Context> native_context(function->context()->native_context());
757 shared, native_context, code, literals);
762 static bool InstallCodeFromOptimizedCodeMap(CompilationInfo* info) {
763 if (FLAG_cache_optimized_code &&
764 info->osr_ast_id().IsNone() &&
765 info->IsOptimizing()) {
766 Handle<SharedFunctionInfo> shared = info->shared_info();
767 Handle<JSFunction>
function = info->closure();
768 ASSERT(!
function.is_null());
769 Handle<Context> native_context(function->context()->native_context());
770 int index = shared->SearchOptimizedCodeMap(*native_context);
772 if (FLAG_trace_opt) {
773 PrintF(
"[found optimized code for: ");
774 function->PrintName();
778 shared->InstallFromOptimizedCodeMap(*
function, index);
792 VMState state(isolate, COMPILER);
794 PostponeInterruptsScope postpone(isolate);
797 int compiled_size = shared->end_position() - shared->start_position();
798 isolate->
counters()->total_compile_size()->Increment(compiled_size);
800 if (InstallCodeFromOptimizedCodeMap(info))
return true;
807 HistogramTimerScope timer(isolate->
counters()->compile_lazy());
812 shared->set_language_mode(language_mode);
815 if (!MakeCode(info)) {
820 InstallCodeCommon(info);
825 info->
closure()->ReplaceCode(*code);
826 InsertCodeIntoOptimizedCodeMap(info);
829 return InstallFullCode(info);
840 if (closure->IsInRecompileQueue())
return;
841 ASSERT(closure->IsMarkedForParallelRecompilation());
843 Isolate* isolate = closure->GetIsolate();
844 if (!isolate->optimizing_compiler_thread()->IsQueueAvailable()) {
845 if (FLAG_trace_parallel_recompilation) {
846 PrintF(
" ** Compilation queue, will retry opting on next run.\n");
852 VMState state(isolate, PARALLEL_COMPILER_PROLOGUE);
853 PostponeInterruptsScope postpone(isolate);
856 int compiled_size = shared->end_position() - shared->start_position();
857 isolate->counters()->total_compile_size()->Increment(compiled_size);
861 CompilationHandleScope handle_scope(*info);
863 if (InstallCodeFromOptimizedCodeMap(*info))
return;
866 LanguageMode language_mode = info->function()->language_mode();
867 info->SetLanguageMode(language_mode);
868 shared->set_language_mode(language_mode);
876 isolate->optimizing_compiler_thread()->QueueForOptimization(compiler);
877 shared->code()->set_profiler_ticks(0);
878 closure->ReplaceCode(isolate->builtins()->builtin(
879 Builtins::kInRecompileQueue));
882 isolate->clear_pending_exception();
883 InstallFullCode(*info);
889 if (isolate->has_pending_exception()) {
890 isolate->clear_pending_exception();
902 "failed/bailed out last time");
910 InstallCodeCommon(*info);
914 info->closure()->ReplaceCode(*code);
915 if (info->shared_info()->SearchOptimizedCodeMap(
916 info->closure()->context()->native_context()) == -1) {
917 InsertCodeIntoOptimizedCodeMap(*info);
920 info->SetCode(
Handle<Code>(info->shared_info()->code()));
921 InstallFullCode(*info);
955 }
else if (GenerateCode(&info)) {
970 result->set_allows_lazy_compilation(allow_lazy);
971 result->set_allows_lazy_compilation_without_context(allow_lazy_without_ctx);
977 live_edit_tracker.RecordFunctionInfo(result, literal, info.
zone());
992 function_info->set_script(*script);
998 function_info->set_is_toplevel(is_toplevel);
1000 function_info->SetThisPropertyAssignmentsInfo(
1004 function_info->set_allows_lazy_compilation_without_context(
1010 function_info->set_is_function(lit->
is_function());
1027 CpuProfiler::is_profiling(info->
isolate())) {
1032 if (script->name()->IsString()) {
1036 CodeCreateEvent(Logger::ToNativeByScript(tag, *script),
1043 CodeCreateEvent(Logger::ToNativeByScript(tag, *script),
1046 shared->DebugName()));
Failure * StackOverflow()
bool AllowsLazyCompilationWithoutContext()
Code * builtin(Name name)
Handle< FixedArray > this_property_assignments()
int expected_property_count()
static bool IsActive(Isolate *isolate)
MUST_USE_RESULT Status CreateGraph()
CompilationCache * compilation_cache()
void PrintF(const char *format,...)
static String * cast(Object *obj)
static bool UseCrankshaft()
void SetScope(Scope *scope)
void SetCode(Handle< Code > code)
CompilationInfo * info() const
static Smi * FromInt(int value)
static bool MakeCode(CompilationInfo *info)
Handle< Script > NewScript(Handle< String > source)
bool has_duplicate_parameters()
bool outer_scope_calls_non_strict_eval() const
Handle< Script > script() const
static bool Analyze(CompilationInfo *info)
void EnableDeoptimizationSupport()
bool is_expression() const
bool is_logging_code_events()
Vector< T > SubVector(int from, int to)
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kInstanceClassNameOffset kHiddenPrototypeBit kReadOnlyPrototypeBit is_toplevel
void SetPreParseData(ScriptDataImpl *pre_parse_data)
#define ASSERT(condition)
#define PROFILE(isolate, Call)
void PutEval(Handle< String > source, Handle< Context > context, bool is_global, Handle< SharedFunctionInfo > function_info, int scope_position)
bool has_only_simple_this_property_assignments()
void SetExtension(v8::Extension *extension)
void SetLanguageMode(LanguageMode language_mode)
bool IsOptimizing() const
Handle< String > debug_name() const
static Handle< SharedFunctionInfo > CompileEval(Handle< String > source, Handle< Context > context, bool is_global, LanguageMode language_mode, int scope_position)
static void RecompileParallel(Handle< JSFunction > function)
static Handle< ScopeInfo > Create(Scope *scope, Zone *zone)
void PutScript(Handle< String > source, Handle< Context > context, Handle< SharedFunctionInfo > function_info)
static bool Parse(CompilationInfo *info, int flags)
MUST_USE_RESULT Status AbortOptimization()
bool HasTrivialOuterContext() const
void DisableOptimization()
bool AllowsLazyCompilation() const
Handle< SharedFunctionInfo > LookupEval(Handle< String > source, Handle< Context > context, bool is_global, LanguageMode language_mode, int scope_position)
static void InstallOptimizedCode(OptimizingCompiler *info)
void ReportPendingMessages()
CompilationInfo(Handle< Script > script, Zone *zone)
Variable * arguments() const
int num_stack_slots() const
static void AddToOptimizedCodeMap(Handle< SharedFunctionInfo > shared, Handle< Context > native_context, Handle< Code > code, Handle< FixedArray > literals)
LanguageMode language_mode() const
Handle< Code > code() const
int function_token_position() const
FunctionLiteral * function() const
bool ShouldSelfOptimize()
static HTracer * Instance()
Handle< String > inferred_name() const
MUST_USE_RESULT Status GenerateAndInstallCode()
static void SetFunctionInfo(Handle< SharedFunctionInfo > function_info, FunctionLiteral *lit, bool is_toplevel, Handle< Script > script)
static LChunk * NewChunk(HGraph *graph)
int materialized_literal_count()
int num_parameters() const
bool has_pending_exception()
static ScopeInfo * Empty()
Handle< JSFunction > closure() const
Vector< const char > CStrVector(const char *data)
bool is_anonymous() const
static const int kMaxFixedIndex
int GetScriptLineNumber(Handle< Script > script, int code_pos)
void SetContext(Handle< Context > context)
Status last_status() const
static Handle< SharedFunctionInfo > Compile(Handle< String > source, Handle< Object > script_name, int line_offset, int column_offset, Handle< Context > context, v8::Extension *extension, ScriptDataImpl *pre_data, Handle< Object > script_data, NativesFlag is_natives_code)
void set_bailout_reason(const char *reason)
bool IsCompilingForDebugging()
Handle< SharedFunctionInfo > shared_info() const
bool DebuggerHasBreakPoints()
int start_position() const
static Handle< T > null()
Handle< SharedFunctionInfo > LookupScript(Handle< String > source, Handle< Object > name, int line_offset, int column_offset, Handle< Context > context)
#define ASSERT_EQ(v1, v2)
static Handle< SharedFunctionInfo > BuildFunctionInfo(FunctionLiteral *node, Handle< Script > script)
Handle< String > name() const
AstProperties::Flags * flags()
static bool CompileLazy(CompilationInfo *info)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of MIPS FPU instructions if NULL
void Bailout(const char *reason)
LanguageMode language_mode() const
void SetExpectedNofPropertiesFromEstimate(Handle< SharedFunctionInfo > shared, int estimate)
void TraceCompilation(FunctionLiteral *function)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
virtual ~CompilationInfo()
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of MIPS FPU instructions if expose natives in global object expose gc extension number of stack frames to capture disable builtin natives files print a stack trace if an assertion failure occurs use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations prepare for turning on always opt minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions automatically set the debug break flag when debugger commands are in the queue always cause a debug break before aborting maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print more details following each garbage collection print amount of external allocated memory after each time it is adjusted flush code that we expect not to use again before full gc do incremental marking steps track object counts and memory usage use caching Perform compaction on every full GC Never perform compaction on full GC testing only Compact code space on full incremental collections Default seed for initializing random allows verbose printing trace parsing and preparsing Check icache flushes in ARM and MIPS simulator Stack alingment in bytes in print stack trace when throwing exceptions randomize hashes to avoid predictable hash Fixed seed to use to hash property activate a timer that switches between V8 threads testing_bool_flag float flag Seed used for threading test randomness A filename with extra code to be included in the Print usage including flags
static const int kMinFixedIndex
bool AllowsLazyCompilation()
MUST_USE_RESULT Status OptimizeGraph()
static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, CompilationInfo *info, Handle< SharedFunctionInfo > shared)
void SetFunction(FunctionLiteral *literal)
static bool Rewrite(CompilationInfo *info)
bool Optimize(SmartArrayPointer< char > *bailout_reason)
static JSFunction * cast(Object *obj)