Home | History | Annotate | Download | only in src

Lines Matching refs:Code

6 //     * Redistributions of source code must retain the above copyright
148 void CompilationInfo::CommitDependencies(Handle<Code> code) {
158 dependent_code->UpdateToFinishedCode(group, this, *code);
197 Code::Flags CompilationInfo::flags() const {
199 return Code::ComputeFlags(code_stub()->GetCodeKind(),
205 return Code::ComputeFlags(Code::OPTIMIZED_FUNCTION);
236 Handle<Code> code(shared_info()->code());
237 SetCode(code);
241 // Determine whether to use the full compiler for all code. If the flag
244 // the code from the full compiler supports mode precise break points. For the
245 // crankshaft adaptive compiler debugging the optimized code is not possible at
301 // going, not necessarily that we optimized the code.
324 // We should never arrive here if there is no code object on the
326 Handle<Code> code(info()->shared_info()->code());
327 ASSERT(code->kind() == Code::FUNCTION);
333 // Fall back to using the full code generator if it's not possible
335 // generated code for this from the shared function object.
337 info()->SetCode(code);
373 info()->SetCode(code);
377 // Recompile the unoptimized version of the code if the current version
379 // run the full code generator to get a baseline for the compile-time
389 // optimized code.
398 shared->EnableDeoptimizationSupport(*unoptimized.code());
399 // The existing unoptimized code was replaced with the new one.
409 // Check that the unoptimized, shared code is ready for
411 // optimizable marker in the code object and optimize anyway. This
412 // is safe as long as the unoptimized code has deoptimization
414 ASSERT(FLAG_always_opt || code->optimizable());
433 info()->SetCode(Handle<Code>::null());
493 // between graph creation and code generation, we disallow accessing
496 Handle<Code> optimized_code = chunk_->Codegen();
532 // Precondition: code has been parsed. Postcondition: the code field in
541 // Precondition: code has been parsed. Postcondition: the code field in
580 Code* code = it.frame()->LookupCode();
582 it.frame()->pc() - code->instruction_start());
613 // Compile the code.
622 ASSERT(!info->code().is_null());
628 info->code(),
639 *info->code(),
645 info->code(),
652 *info->code(),
656 GDBJIT(AddCode(Handle<String>(), script, info->code(), info));
793 // Explicitly disable optimization for eval code. We're not yet prepared
794 // to handle eval-code in the optimizing compiler.
821 // Update the shared function info with the compiled code and the
824 // trigger a GC, causing the ASSERT below to be invalid if the code
825 // was flushed. By setting the code object last we avoid this.
827 Handle<Code> code = info->code();
828 CHECK(code->kind() == Code::FUNCTION);
833 shared->ReplaceCode(*code);
835 function->ReplaceCode(*code);
844 // Check the function has compiled code.
855 // active as it makes no sense to compile optimized code then.
869 Handle<Code> code = info->code();
870 ASSERT(!code.is_null());
873 // function info, e.g., we might have flushed the code and must
874 // reset this bit when lazy compiling the code again.
875 if (shared->optimization_disabled()) code->set_optimizable(false);
877 if (shared->code() == *code) {
878 // Do not send compilation event for the same code twice.
886 Handle<Code> code = info->code();
889 code->kind() == Code::OPTIMIZED_FUNCTION) {
895 shared, native_context, code, literals);
911 PrintF("[found optimized code for ");
915 // Caching of optimized code enabled and optimized code found.
950 // Compile the code.
959 Handle<Code> code = info->code();
961 info->closure()->ReplaceCode(*code);
970 ASSERT(info->code().is_null());
1021 shared->code()->set_profiler_ticks(0);
1031 if (shared->code()->back_edges_patched_for_osr()) {
1034 // the unoptimized code without running into OSR. If the unoptimized
1035 // code has been patched for OSR, unpatch it.
1037 Handle<Code> interrupt_code = interrupt_stub.GetCode(isolate);
1038 Handle<Code> replacement_code =
1040 Deoptimizer::RevertInterruptCode(shared->code(),
1069 // If crankshaft succeeded, install the optimized code else install
1070 // the unoptimized code.
1089 Handle<Code> code = info->code();
1091 info->closure()->ReplaceCode(*code);
1097 PrintF(" ** Optimized code for ");
1102 info->SetCode(Handle<Code>(info->shared_info()->code()));
1105 // Optimized code is finally replacing unoptimized code. Reset the latter's
1107 info->shared_info()->code()->set_profiler_ticks(0);
1114 // Precondition: code has been parsed and scopes have been analyzed.
1138 // Generate code
1140 Handle<Code> code = isolate->builtins()->LazyCompile();
1141 info.SetCode(code);
1143 ASSERT(!info.code().is_null());
1154 info.code(),
1209 // Log the code generation. If source information is available include
1215 Handle<Code> code = info->code();
1216 if (*code == info->isolate()->builtins()->builtin(Builtins::kLazyCompile))
1223 *code,
1231 *code,
1241 Handle<Code>(info->code()),