| Index: src/compiler.h
|
| diff --git a/src/compiler.h b/src/compiler.h
|
| index 09aa23dec984f72b5644bd1f8e52855ffcda99d6..f99977aef4938a76cc9dbe867dc0bb47e09c31ed 100644
|
| --- a/src/compiler.h
|
| +++ b/src/compiler.h
|
| @@ -120,6 +120,19 @@ class CompilationInfo BASE_EMBEDDED {
|
| ASSERT(IsOptimizing());
|
| osr_ast_id_ = osr_ast_id;
|
| }
|
| + void MarkCompilingForDebugging(Handle<Code> current_code) {
|
| + ASSERT(mode_ != OPTIMIZE);
|
| + ASSERT(current_code->kind() == Code::FUNCTION);
|
| + flags_ |= IsCompilingForDebugging::encode(true);
|
| + if (current_code->is_compiled_optimizable()) {
|
| + EnableDeoptimizationSupport();
|
| + } else {
|
| + mode_ = CompilationInfo::NONOPT;
|
| + }
|
| + }
|
| + bool IsCompilingForDebugging() {
|
| + return IsCompilingForDebugging::decode(flags_);
|
| + }
|
|
|
| bool has_global_object() const {
|
| return !closure().is_null() && (closure()->context()->global() != NULL);
|
| @@ -139,10 +152,12 @@ class CompilationInfo BASE_EMBEDDED {
|
| void DisableOptimization();
|
|
|
| // Deoptimization support.
|
| - bool HasDeoptimizationSupport() const { return supports_deoptimization_; }
|
| + bool HasDeoptimizationSupport() const {
|
| + return SupportsDeoptimization::decode(flags_);
|
| + }
|
| void EnableDeoptimizationSupport() {
|
| ASSERT(IsOptimizable());
|
| - supports_deoptimization_ = true;
|
| + flags_ |= SupportsDeoptimization::encode(true);
|
| }
|
|
|
| // Determine whether or not we can adaptively optimize.
|
| @@ -203,6 +218,11 @@ class CompilationInfo BASE_EMBEDDED {
|
| class IsNativesSyntaxAllowed: public BitField<bool, 5, 1> {};
|
| // Is this a function from our natives.
|
| class IsNative: public BitField<bool, 6, 1> {};
|
| + // Is this code being compiled with support for deoptimization..
|
| + class SupportsDeoptimization: public BitField<bool, 7, 1> {};
|
| + // If compiling for debugging produce just full code matching the
|
| + // initial mode setting.
|
| + class IsCompilingForDebugging: public BitField<bool, 8, 1> {};
|
|
|
|
|
| unsigned flags_;
|
| @@ -231,7 +251,6 @@ class CompilationInfo BASE_EMBEDDED {
|
|
|
| // Compilation mode flag and whether deoptimization is allowed.
|
| Mode mode_;
|
| - bool supports_deoptimization_;
|
| int osr_ast_id_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
|
|
|