HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Android 10
|
10.0.0_r6
下载
查看原文件
收藏
根目录
external
v8
src
compiler-dispatcher
unoptimized-compile-job.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/compiler-dispatcher/unoptimized-compile-job.h" #include "src/assert-scope.h" #include "src/base/optional.h" #include "src/compiler-dispatcher/compiler-dispatcher-tracer.h" #include "src/compiler.h" #include "src/flags.h" #include "src/global-handles.h" #include "src/interpreter/interpreter.h" #include "src/isolate.h" #include "src/objects-inl.h" #include "src/parsing/parse-info.h" #include "src/parsing/parser.h" #include "src/parsing/scanner-character-streams.h" #include "src/unicode-cache.h" #include "src/unoptimized-compilation-info.h" #include "src/utils.h" namespace v8 { namespace internal { namespace { class OneByteWrapper : public v8::String::ExternalOneByteStringResource { public: OneByteWrapper(const void* data, int length) : data_(data), length_(length) {} ~OneByteWrapper() override = default; const char* data() const override { return reinterpret_cast
(data_); } size_t length() const override { return static_cast
(length_); } private: const void* data_; int length_; DISALLOW_COPY_AND_ASSIGN(OneByteWrapper); }; class TwoByteWrapper : public v8::String::ExternalStringResource { public: TwoByteWrapper(const void* data, int length) : data_(data), length_(length) {} ~TwoByteWrapper() override = default; const uint16_t* data() const override { return reinterpret_cast
(data_); } size_t length() const override { return static_cast
(length_); } private: const void* data_; int length_; DISALLOW_COPY_AND_ASSIGN(TwoByteWrapper); }; } // namespace UnoptimizedCompileJob::UnoptimizedCompileJob(Isolate* isolate, CompilerDispatcherTracer* tracer, Handle
shared, size_t max_stack_size) : CompilerDispatcherJob(Type::kUnoptimizedCompile), main_thread_id_(isolate->thread_id().ToInteger()), tracer_(tracer), allocator_(isolate->allocator()), context_(isolate->global_handles()->Create(isolate->context())), shared_(isolate->global_handles()->Create(*shared)), max_stack_size_(max_stack_size), trace_compiler_dispatcher_jobs_(FLAG_trace_compiler_dispatcher_jobs) { DCHECK(!shared_->is_toplevel()); // TODO(rmcilroy): Handle functions with non-empty outer scope info. DCHECK(!shared_->HasOuterScopeInfo()); HandleScope scope(isolate); Handle
登录后可以享受更多权益
您还没有登录,登录后您可以:
收藏Android系统代码
收藏喜欢的文章
多个平台共享账号
去登录
首次使用?从这里
注册