HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Pie
|
9.0.0_r8
下载
查看原文件
收藏
根目录
external
v8
src
compiler-dispatcher
compiler-dispatcher-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/compiler-dispatcher-job.h" #include "src/assert-scope.h" #include "src/compilation-info.h" #include "src/compiler-dispatcher/compiler-dispatcher-tracer.h" #include "src/compiler.h" #include "src/flags.h" #include "src/global-handles.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/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 CompilerDispatcherJob::CompilerDispatcherJob(Isolate* isolate, CompilerDispatcherTracer* tracer, Handle
shared, size_t max_stack_size) : status_(CompileJobStatus::kInitial), isolate_(isolate), tracer_(tracer), context_(Handle
::cast( isolate_->global_handles()->Create(isolate->context()))), shared_(Handle
::cast( isolate_->global_handles()->Create(*shared))), max_stack_size_(max_stack_size), trace_compiler_dispatcher_jobs_(FLAG_trace_compiler_dispatcher_jobs) { DCHECK(!shared_->is_toplevel()); HandleScope scope(isolate_); Handle
登录后可以享受更多权益
您还没有登录,登录后您可以:
收藏Android系统代码
收藏喜欢的文章
多个平台共享账号
去登录
首次使用?从这里
注册