| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 017732ed42f10e76caf90a00969a85d07c7f46e1..2459c697b924f644bb5456c5950cd7b516d41cc6 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -212,7 +212,7 @@ Code::Flags CompilationInfo::flags() const {
|
| code_stub()->GetICState(),
|
| code_stub()->GetExtraICState(),
|
| code_stub()->GetStubType(),
|
| - code_stub()->GetStubFlags());
|
| + code_stub()->GetHandlerKind());
|
| } else {
|
| return Code::ComputeFlags(Code::OPTIMIZED_FUNCTION);
|
| }
|
| @@ -243,6 +243,13 @@ bool CompilationInfo::ShouldSelfOptimize() {
|
| }
|
|
|
|
|
| +void CompilationInfo::PrepareForCompilation(Scope* scope) {
|
| + ASSERT(scope_ == NULL);
|
| + scope_ = scope;
|
| + function()->ProcessFeedbackSlots(isolate_);
|
| +}
|
| +
|
| +
|
| class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
|
| public:
|
| explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info)
|
| @@ -372,7 +379,7 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
|
| // Note that we use the same AST that we will use for generating the
|
| // optimized code.
|
| unoptimized.SetFunction(info()->function());
|
| - unoptimized.SetScope(info()->scope());
|
| + unoptimized.PrepareForCompilation(info()->scope());
|
| unoptimized.SetContext(info()->context());
|
| if (should_recompile) unoptimized.EnableDeoptimizationSupport();
|
| bool succeeded = FullCodeGenerator::MakeCode(&unoptimized);
|
| @@ -991,7 +998,7 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
|
| // Precondition: code has been parsed and scopes have been analyzed.
|
| CompilationInfoWithZone info(script);
|
| info.SetFunction(literal);
|
| - info.SetScope(literal->scope());
|
| + info.PrepareForCompilation(literal->scope());
|
| info.SetLanguageMode(literal->scope()->language_mode());
|
|
|
| Isolate* isolate = info.isolate();
|
|
|