HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Pie
|
9.0.0_r8
下载
查看原文件
收藏
根目录
external
v8
src
full-codegen
full-codegen.cc
// Copyright 2012 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/full-codegen/full-codegen.h" #include "src/ast/ast-numbering.h" #include "src/ast/ast.h" #include "src/ast/prettyprinter.h" #include "src/ast/scopes.h" #include "src/code-factory.h" #include "src/codegen.h" #include "src/compilation-info.h" #include "src/compiler.h" #include "src/debug/debug.h" #include "src/debug/liveedit.h" #include "src/frames-inl.h" #include "src/globals.h" #include "src/isolate-inl.h" #include "src/macro-assembler.h" #include "src/snapshot/snapshot.h" #include "src/tracing/trace-event.h" namespace v8 { namespace internal { #define __ ACCESS_MASM(masm()) class FullCodegenCompilationJob final : public CompilationJob { public: explicit FullCodegenCompilationJob(CompilationInfo* info) : CompilationJob(info->isolate(), info, "Full-Codegen") {} bool can_execute_on_background_thread() const override { return false; } CompilationJob::Status PrepareJobImpl() final { return SUCCEEDED; } CompilationJob::Status ExecuteJobImpl() final { DCHECK(ThreadId::Current().Equals(isolate()->thread_id())); return FullCodeGenerator::MakeCode(info(), stack_limit()) ? SUCCEEDED : FAILED; } CompilationJob::Status FinalizeJobImpl() final { return SUCCEEDED; } private: DISALLOW_COPY_AND_ASSIGN(FullCodegenCompilationJob); }; FullCodeGenerator::FullCodeGenerator(MacroAssembler* masm, CompilationInfo* info, uintptr_t stack_limit) : masm_(masm), info_(info), isolate_(info->isolate()), zone_(info->zone()), scope_(info->scope()), nesting_stack_(NULL), loop_depth_(0), operand_stack_depth_(0), globals_(NULL), context_(NULL), bailout_entries_(info->HasDeoptimizationSupport() ? info->literal()->ast_node_count() : 0, info->zone()), back_edges_(2, info->zone()), source_position_table_builder_(info->zone(), info->SourcePositionRecordingMode()), ic_total_count_(0) { DCHECK(!info->IsStub()); Initialize(stack_limit); } // static CompilationJob* FullCodeGenerator::NewCompilationJob(CompilationInfo* info) { return new FullCodegenCompilationJob(info); } // static bool FullCodeGenerator::MakeCode(CompilationInfo* info) { return MakeCode(info, info->isolate()->stack_guard()->real_climit()); } // static bool FullCodeGenerator::MakeCode(CompilationInfo* info, uintptr_t stack_limit) { Isolate* isolate = info->isolate(); DCHECK(!info->shared_info()->must_use_ignition_turbo()); DCHECK(!FLAG_minimal); RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::CompileFullCode); TimerEventScope
timer(info->isolate()); TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileFullCode"); Handle
登录后可以享受更多权益
您还没有登录,登录后您可以:
收藏Android系统代码
收藏喜欢的文章
多个平台共享账号
去登录
首次使用?从这里
注册