Skip to content

Commit ab25589

Browse files
committed
deps: backport 819b40a from V8 upstream
Original commit message: Use baseline code to compute message locations. This switches Isolate::ComputeLocation to use baseline code when computing message locations. This unifies locations between optimized and non-optimized code by always going through the FrameSummary for location computation. [email protected] TEST=message/regress/regress-4266 BUG=v8:4266 LOG=n Review URL: https://codereview.chromium.org/1331603002 Cr-Commit-Position: refs/heads/master@{#30635} Fixes: #3934 PR-URL: #3937 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent b061e3a commit ab25589

File tree

17 files changed

+61
-18
lines changed

17 files changed

+61
-18
lines changed

deps/v8/src/ast-numbering.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
553553
Scope* scope = node->scope();
554554

555555
if (scope->HasIllegalRedeclaration()) {
556-
scope->VisitIllegalRedeclaration(this);
556+
Visit(scope->GetIllegalRedeclaration());
557557
DisableOptimization(kFunctionWithIllegalRedeclaration);
558558
return Finish(node);
559559
}

deps/v8/src/compiler/ast-graph-builder.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,7 @@ void AstGraphBuilder::CreateGraphBody(bool stack_check) {
586586

587587
// Visit illegal re-declaration and bail out if it exists.
588588
if (scope->HasIllegalRedeclaration()) {
589-
AstEffectContext for_effect(this);
590-
scope->VisitIllegalRedeclaration(this);
589+
VisitForEffect(scope->GetIllegalRedeclaration());
591590
return;
592591
}
593592

deps/v8/src/compiler/linkage.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ int Linkage::FrameStateInputCount(Runtime::FunctionId function) {
218218
switch (function) {
219219
case Runtime::kAllocateInTargetSpace:
220220
case Runtime::kDateField:
221-
case Runtime::kFinalizeClassDefinition: // TODO(conradw): Is it safe?
222221
case Runtime::kDefineClassMethod: // TODO(jarin): Is it safe?
223222
case Runtime::kDefineGetterPropertyUnchecked: // TODO(jarin): Is it safe?
224223
case Runtime::kDefineSetterPropertyUnchecked: // TODO(jarin): Is it safe?
224+
case Runtime::kFinalizeClassDefinition: // TODO(conradw): Is it safe?
225225
case Runtime::kForInDone:
226226
case Runtime::kForInStep:
227227
case Runtime::kGetOriginalConstructor:
@@ -244,6 +244,7 @@ int Linkage::FrameStateInputCount(Runtime::FunctionId function) {
244244
case Runtime::kInlineGetCallerJSFunction:
245245
case Runtime::kInlineGetPrototype:
246246
case Runtime::kInlineRegExpExec:
247+
case Runtime::kInlineSubString:
247248
case Runtime::kInlineToObject:
248249
return 1;
249250
case Runtime::kInlineDeoptimizeNow:

deps/v8/src/full-codegen/arm/full-codegen-arm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ void FullCodeGenerator::Generate() {
338338
// redeclaration.
339339
if (scope()->HasIllegalRedeclaration()) {
340340
Comment cmnt(masm_, "[ Declarations");
341-
scope()->VisitIllegalRedeclaration(this);
341+
VisitForEffect(scope()->GetIllegalRedeclaration());
342342

343343
} else {
344344
PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);

deps/v8/src/full-codegen/arm64/full-codegen-arm64.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ void FullCodeGenerator::Generate() {
344344
// redeclaration.
345345
if (scope()->HasIllegalRedeclaration()) {
346346
Comment cmnt(masm_, "[ Declarations");
347-
scope()->VisitIllegalRedeclaration(this);
347+
VisitForEffect(scope()->GetIllegalRedeclaration());
348348

349349
} else {
350350
PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);

deps/v8/src/full-codegen/ia32/full-codegen-ia32.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ void FullCodeGenerator::Generate() {
341341
// redeclaration.
342342
if (scope()->HasIllegalRedeclaration()) {
343343
Comment cmnt(masm_, "[ Declarations");
344-
scope()->VisitIllegalRedeclaration(this);
344+
VisitForEffect(scope()->GetIllegalRedeclaration());
345345

346346
} else {
347347
PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);

deps/v8/src/full-codegen/mips/full-codegen-mips.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ void FullCodeGenerator::Generate() {
356356
// redeclaration.
357357
if (scope()->HasIllegalRedeclaration()) {
358358
Comment cmnt(masm_, "[ Declarations");
359-
scope()->VisitIllegalRedeclaration(this);
359+
VisitForEffect(scope()->GetIllegalRedeclaration());
360360

361361
} else {
362362
PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);

deps/v8/src/full-codegen/mips64/full-codegen-mips64.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ void FullCodeGenerator::Generate() {
351351
// redeclaration.
352352
if (scope()->HasIllegalRedeclaration()) {
353353
Comment cmnt(masm_, "[ Declarations");
354-
scope()->VisitIllegalRedeclaration(this);
354+
VisitForEffect(scope()->GetIllegalRedeclaration());
355355

356356
} else {
357357
PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);

deps/v8/src/full-codegen/ppc/full-codegen-ppc.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ void FullCodeGenerator::Generate() {
349349
// redeclaration.
350350
if (scope()->HasIllegalRedeclaration()) {
351351
Comment cmnt(masm_, "[ Declarations");
352-
scope()->VisitIllegalRedeclaration(this);
352+
VisitForEffect(scope()->GetIllegalRedeclaration());
353353

354354
} else {
355355
PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);

deps/v8/src/full-codegen/x64/full-codegen-x64.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ void FullCodeGenerator::Generate() {
338338
// redeclaration.
339339
if (scope()->HasIllegalRedeclaration()) {
340340
Comment cmnt(masm_, "[ Declarations");
341-
scope()->VisitIllegalRedeclaration(this);
341+
VisitForEffect(scope()->GetIllegalRedeclaration());
342342

343343
} else {
344344
PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);

0 commit comments

Comments
 (0)