| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 5ed274a7a20f4ae734db91772bcdfb7d7e64e536..b94041acaa79c0ca5f24a7b73e93501fd7f3ff50 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -120,6 +120,7 @@ void CompilationInfo::Initialize(Isolate* isolate,
|
| return;
|
| }
|
| mode_ = V8::UseCrankshaft() ? mode : NONOPT;
|
| + abort_due_to_map_dependency_ = false;
|
| if (script_->type()->value() == Script::TYPE_NATIVE) {
|
| MarkAsNative();
|
| }
|
| @@ -446,6 +447,12 @@ OptimizingCompiler::Status OptimizingCompiler::CreateGraph() {
|
| }
|
| }
|
|
|
| + if (info()->HasAbortedDueToDependencyChange()) {
|
| + info_->set_bailout_reason(kBailedOutDueToDependentMap);
|
| + info_->AbortOptimization();
|
| + return SetLastStatus(BAILED_OUT);
|
| + }
|
| +
|
| return SetLastStatus(SUCCEEDED);
|
| }
|
|
|
| @@ -454,6 +461,7 @@ OptimizingCompiler::Status OptimizingCompiler::OptimizeGraph() {
|
| DisallowHeapAllocation no_allocation;
|
| DisallowHandleAllocation no_handles;
|
| DisallowHandleDereference no_deref;
|
| + DisallowMapInvalidation no_map_invalidation;
|
|
|
| ASSERT(last_status() == SUCCEEDED);
|
| Timer t(this, &time_taken_to_optimize_);
|
| @@ -474,6 +482,8 @@ OptimizingCompiler::Status OptimizingCompiler::OptimizeGraph() {
|
|
|
| OptimizingCompiler::Status OptimizingCompiler::GenerateAndInstallCode() {
|
| ASSERT(last_status() == SUCCEEDED);
|
| + ASSERT(!info()->HasAbortedDueToDependencyChange());
|
| + DisallowMapInvalidation no_map_invalidation;
|
| { // Scope for timer.
|
| Timer timer(this, &time_taken_to_codegen_);
|
| ASSERT(chunk_ != NULL);
|
|
|