Skip to content

Commit

Permalink
5.1.281.111(b287b9) from 6.12.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jBarz committed Jan 3, 2018
1 parent 335e93e commit 2220eec
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 5
#define V8_MINOR_VERSION 1
#define V8_BUILD_NUMBER 281
#define V8_PATCH_LEVEL 108
#define V8_PATCH_LEVEL 111

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
6 changes: 4 additions & 2 deletions src/compiler/ast-graph-builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,8 @@ void AstGraphBuilder::VisitClassLiteralContents(ClassLiteral* expr) {
jsgraph()->Constant(property->NeedsSetFunctionName());
const Operator* op =
javascript()->CallRuntime(Runtime::kDefineDataPropertyInLiteral);
NewNode(op, receiver, key, value, attr, set_function_name);
Node* call = NewNode(op, receiver, key, value, attr, set_function_name);
PrepareFrameState(call, BailoutId::None());
break;
}
case ObjectLiteral::Property::GETTER: {
Expand Down Expand Up @@ -1870,7 +1871,8 @@ void AstGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
jsgraph()->Constant(property->NeedsSetFunctionName());
const Operator* op =
javascript()->CallRuntime(Runtime::kDefineDataPropertyInLiteral);
NewNode(op, receiver, key, value, attr, set_function_name);
Node* call = NewNode(op, receiver, key, value, attr, set_function_name);
PrepareFrameState(call, expr->GetIdForPropertySet(property_index));
break;
}
case ObjectLiteral::Property::PROTOTYPE:
Expand Down
1 change: 0 additions & 1 deletion src/compiler/linkage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ int Linkage::FrameStateInputCount(Runtime::FunctionId function) {
switch (function) {
case Runtime::kAllocateInTargetSpace:
case Runtime::kCreateIterResultObject:
case Runtime::kDefineDataPropertyInLiteral:
case Runtime::kDefineGetterPropertyUnchecked: // TODO(jarin): Is it safe?
case Runtime::kDefineSetterPropertyUnchecked: // TODO(jarin): Is it safe?
case Runtime::kFinalizeClassDefinition: // TODO(conradw): Is it safe?
Expand Down
2 changes: 2 additions & 0 deletions src/full-codegen/arm/full-codegen-arm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1572,6 +1572,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
PushOperand(Smi::FromInt(NONE));
PushOperand(Smi::FromInt(property->NeedsSetFunctionName()));
CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral);
PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
NO_REGISTERS);
} else {
DropOperands(3);
}
Expand Down
2 changes: 2 additions & 0 deletions src/full-codegen/arm64/full-codegen-arm64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
PushOperand(Smi::FromInt(NONE));
PushOperand(Smi::FromInt(property->NeedsSetFunctionName()));
CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral);
PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
NO_REGISTERS);
} else {
DropOperands(3);
}
Expand Down
2 changes: 2 additions & 0 deletions src/full-codegen/ia32/full-codegen-ia32.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1493,6 +1493,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
PushOperand(Smi::FromInt(NONE));
PushOperand(Smi::FromInt(property->NeedsSetFunctionName()));
CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral);
PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
NO_REGISTERS);
} else {
DropOperands(3);
}
Expand Down
2 changes: 2 additions & 0 deletions src/full-codegen/mips/full-codegen-mips.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
PushOperand(Smi::FromInt(NONE));
PushOperand(Smi::FromInt(property->NeedsSetFunctionName()));
CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral);
PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
NO_REGISTERS);
} else {
DropOperands(3);
}
Expand Down
2 changes: 2 additions & 0 deletions src/full-codegen/mips64/full-codegen-mips64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
PushOperand(Smi::FromInt(NONE));
PushOperand(Smi::FromInt(property->NeedsSetFunctionName()));
CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral);
PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
NO_REGISTERS);
} else {
DropOperands(3);
}
Expand Down
2 changes: 2 additions & 0 deletions src/full-codegen/ppc/full-codegen-ppc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
PushOperand(Smi::FromInt(NONE));
PushOperand(Smi::FromInt(property->NeedsSetFunctionName()));
CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral);
PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
NO_REGISTERS);
} else {
DropOperands(3);
}
Expand Down
2 changes: 2 additions & 0 deletions src/full-codegen/s390/full-codegen-s390.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
PushOperand(Smi::FromInt(NONE));
PushOperand(Smi::FromInt(property->NeedsSetFunctionName()));
CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral);
PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
NO_REGISTERS);
} else {
DropOperands(3);
}
Expand Down
2 changes: 2 additions & 0 deletions src/full-codegen/x64/full-codegen-x64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
PushOperand(Smi::FromInt(NONE));
PushOperand(Smi::FromInt(property->NeedsSetFunctionName()));
CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral);
PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
NO_REGISTERS);
} else {
DropOperands(3);
}
Expand Down
2 changes: 2 additions & 0 deletions src/full-codegen/x87/full-codegen-x87.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,8 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
PushOperand(Smi::FromInt(NONE));
PushOperand(Smi::FromInt(property->NeedsSetFunctionName()));
CallRuntimeWithOperands(Runtime::kDefineDataPropertyInLiteral);
PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
NO_REGISTERS);
} else {
DropOperands(3);
}
Expand Down
3 changes: 2 additions & 1 deletion src/heap/spaces.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2382,7 +2382,6 @@ HeapObject* FreeList::Allocate(int size_in_bytes) {
int new_node_size = 0;
FreeSpace* new_node = FindNodeFor(size_in_bytes, &new_node_size);
if (new_node == nullptr) return nullptr;
owner_->AllocationStep(new_node->address(), size_in_bytes);

int bytes_left = new_node_size - size_in_bytes;
DCHECK(bytes_left >= 0);
Expand Down Expand Up @@ -2428,6 +2427,8 @@ HeapObject* FreeList::Allocate(int size_in_bytes) {
new_node->address() + new_node_size);
}

owner_->AllocationStep(new_node->address(), size_in_bytes);

return new_node;
}

Expand Down
1 change: 1 addition & 0 deletions src/profiler/sampling-heap-profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ void SamplingHeapProfiler::SampleObject(Address soon_object, size_t size) {
Sample* sample = new Sample(size, node, loc, this);
samples_.insert(sample);
sample->global.SetWeak(sample, OnWeakCallback, WeakCallbackType::kParameter);
sample->global.MarkIndependent();
}

void SamplingHeapProfiler::OnWeakCallback(
Expand Down
18 changes: 18 additions & 0 deletions test/mjsunit/regress/regress-crbug-621816.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Flags: --allow-natives-syntax --turbo

function f() {
var o = {};
o.a = 1;
}
function g() {
var o = { ['a']: function(){} };
f();
}
f();
f();
%OptimizeFunctionOnNextCall(g);
g();

0 comments on commit 2220eec

Please sign in to comment.