HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Android 10
|
10.0.0_r6
下载
查看原文件
收藏
根目录
external
v8
src
snapshot
code-serializer.cc
// Copyright 2016 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/snapshot/code-serializer.h" #include
#include "src/code-stubs.h" #include "src/counters.h" #include "src/debug/debug.h" #include "src/log.h" #include "src/macro-assembler.h" #include "src/objects-inl.h" #include "src/snapshot/object-deserializer.h" #include "src/snapshot/snapshot.h" #include "src/version.h" #include "src/visitors.h" namespace v8 { namespace internal { ScriptData::ScriptData(const byte* data, int length) : owns_data_(false), rejected_(false), data_(data), length_(length) { if (!IsAligned(reinterpret_cast
(data), kPointerAlignment)) { byte* copy = NewArray
(length); DCHECK(IsAligned(reinterpret_cast
(copy), kPointerAlignment)); CopyBytes(copy, data, length); data_ = copy; AcquireDataOwnership(); } } CodeSerializer::CodeSerializer(Isolate* isolate, uint32_t source_hash) : Serializer(isolate), source_hash_(source_hash) { allocator()->UseCustomChunkSize(FLAG_serialization_chunk_size); } // static ScriptCompiler::CachedData* CodeSerializer::Serialize( Handle
info) { Isolate* isolate = info->GetIsolate(); TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute"); HistogramTimerScope histogram_timer(isolate->counters()->compile_serialize()); RuntimeCallTimerScope runtimeTimer(isolate, RuntimeCallCounterId::kCompileSerialize); TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileSerialize"); base::ElapsedTimer timer; if (FLAG_profile_deserialization) timer.Start(); Handle
登录后可以享受更多权益
您还没有登录,登录后您可以:
收藏Android系统代码
收藏喜欢的文章
多个平台共享账号
去登录
首次使用?从这里
注册