[compiler] Remove inclusion of inline header file.

R=marja@chromium.org

Review-Url: https://codereview.chromium.org/2281543002
Cr-Commit-Position: refs/heads/master@{#38926}
This commit is contained in:
mstarzinger 2016-08-26 00:37:21 -07:00 committed by Commit bot
parent 4c5c0d83e4
commit b143cb09d0
5 changed files with 40 additions and 25 deletions

View File

@ -177,6 +177,9 @@ bool CompilationInfo::ShouldSelfOptimize() {
!shared_info()->optimization_disabled();
}
void CompilationInfo::ReopenHandlesInNewHandleScope() {
closure_ = Handle<JSFunction>(*closure_);
}
bool CompilationInfo::has_simple_parameters() {
return scope()->has_simple_parameters();
@ -238,6 +241,30 @@ bool CompilationInfo::ExpectsJSReceiverAsReceiver() {
return is_sloppy(parse_info()->language_mode()) && !parse_info()->is_native();
}
bool CompilationInfo::has_native_context() const {
return !closure().is_null() && (closure()->native_context() != nullptr);
}
Context* CompilationInfo::native_context() const {
return has_native_context() ? closure()->native_context() : nullptr;
}
bool CompilationInfo::has_global_object() const { return has_native_context(); }
JSGlobalObject* CompilationInfo::global_object() const {
return has_global_object() ? native_context()->global_object() : nullptr;
}
void CompilationInfo::AddInlinedFunction(
Handle<SharedFunctionInfo> inlined_function) {
inlined_functions_.push_back(InlinedFunctionHolder(
inlined_function, handle(inlined_function->code())));
}
Code::Kind CompilationInfo::output_code_kind() const {
return Code::ExtractKindFromFlags(code_flags_);
}
// ----------------------------------------------------------------------------
// Implementation of CompilationJob

View File

@ -13,7 +13,6 @@
#include "src/contexts.h"
#include "src/frames.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/source-position-table.h"
#include "src/source-position.h"
#include "src/zone.h"
@ -337,19 +336,11 @@ class CompilationInfo final {
(FLAG_trap_on_stub_deopt && IsStub());
}
bool has_native_context() const {
return !closure().is_null() && (closure()->native_context() != nullptr);
}
bool has_native_context() const;
Context* native_context() const;
Context* native_context() const {
return has_native_context() ? closure()->native_context() : nullptr;
}
bool has_global_object() const { return has_native_context(); }
JSGlobalObject* global_object() const {
return has_global_object() ? native_context()->global_object() : nullptr;
}
bool has_global_object() const;
JSGlobalObject* global_object() const;
// Accessors for the different compilation modes.
bool IsOptimizing() const { return mode_ == OPTIMIZE; }
@ -387,9 +378,7 @@ class CompilationInfo final {
deferred_handles_ = deferred_handles;
}
void ReopenHandlesInNewHandleScope() {
closure_ = Handle<JSFunction>(*closure_);
}
void ReopenHandlesInNewHandleScope();
void AbortOptimization(BailoutReason reason) {
DCHECK(reason != kNoReason);
@ -435,10 +424,10 @@ class CompilationInfo final {
// Do not remove.
Handle<Code> inlined_code_object_root;
explicit InlinedFunctionHolder(
Handle<SharedFunctionInfo> inlined_shared_info)
InlinedFunctionHolder(Handle<SharedFunctionInfo> inlined_shared_info,
Handle<Code> inlined_code_object_root)
: shared_info(inlined_shared_info),
inlined_code_object_root(inlined_shared_info->code()) {}
inlined_code_object_root(inlined_code_object_root) {}
};
typedef std::vector<InlinedFunctionHolder> InlinedFunctionList;
@ -446,15 +435,11 @@ class CompilationInfo final {
return inlined_functions_;
}
void AddInlinedFunction(Handle<SharedFunctionInfo> inlined_function) {
inlined_functions_.push_back(InlinedFunctionHolder(inlined_function));
}
void AddInlinedFunction(Handle<SharedFunctionInfo> inlined_function);
std::unique_ptr<char[]> GetDebugName() const;
Code::Kind output_code_kind() const {
return Code::ExtractKindFromFlags(code_flags_);
}
Code::Kind output_code_kind() const;
StackFrame::Type GetOutputStackFrameType() const;

View File

@ -13,6 +13,7 @@
#include "src/compiler/node.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/schedule.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -8,6 +8,7 @@
#include "src/compiler/linkage.h"
#include "src/compiler/operator-properties.h"
#include "src/interpreter/bytecodes.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -9,6 +9,7 @@
#include "src/allocation.h"
#include "src/base/hashmap.h"
#include "src/compiler.h"
#include "src/log.h"
#include "src/profiler/strings-storage.h"
namespace v8 {