| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 00c391e7f79638a1d697243e284b87e819a068d9..9e7592ee765f4daf56db7140009b1728644d01ec 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -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
|
|
|
|
|