Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: src/compiler/code-generator.cc

Issue 1220013003: [turbofan] Fix bogus materialization from frame with OSR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_contrib-1218873005
Patch Set: Add regression test. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-osr-context.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/pipeline.h" 9 #include "src/compiler/pipeline.h"
10 #include "src/snapshot/serialize.h" // TODO(turbofan): RootIndexMap 10 #include "src/snapshot/serialize.h" // TODO(turbofan): RootIndexMap
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 Register::FromAllocationIndex(RegisterOperand::cast(operand).index()); 224 Register::FromAllocationIndex(RegisterOperand::cast(operand).index());
225 safepoint.DefinePointerRegister(reg, zone()); 225 safepoint.DefinePointerRegister(reg, zone());
226 } 226 }
227 } 227 }
228 } 228 }
229 229
230 230
231 bool CodeGenerator::IsMaterializableFromFrame(Handle<HeapObject> object, 231 bool CodeGenerator::IsMaterializableFromFrame(Handle<HeapObject> object,
232 int* offset_return) { 232 int* offset_return) {
233 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { 233 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) {
234 if (object.is_identical_to(info()->context())) { 234 if (object.is_identical_to(info()->context()) && !info()->is_osr()) {
235 *offset_return = StandardFrameConstants::kContextOffset; 235 *offset_return = StandardFrameConstants::kContextOffset;
236 return true; 236 return true;
237 } else if (object.is_identical_to(info()->closure())) { 237 } else if (object.is_identical_to(info()->closure())) {
238 *offset_return = JavaScriptFrameConstants::kFunctionOffset; 238 *offset_return = JavaScriptFrameConstants::kFunctionOffset;
239 return true; 239 return true;
240 } 240 }
241 } 241 }
242 return false; 242 return false;
243 } 243 }
244 244
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 : masm_(gen->masm()), next_(gen->ools_) { 712 : masm_(gen->masm()), next_(gen->ools_) {
713 gen->ools_ = this; 713 gen->ools_ = this;
714 } 714 }
715 715
716 716
717 OutOfLineCode::~OutOfLineCode() {} 717 OutOfLineCode::~OutOfLineCode() {}
718 718
719 } // namespace compiler 719 } // namespace compiler
720 } // namespace internal 720 } // namespace internal
721 } // namespace v8 721 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-osr-context.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698