Commit 3166d429 authored by adamk's avatar adamk Committed by Commit bot

[ignition] Avoid unnecessary ToName calls in VisitClassLiteralProperties

R=rmcilroy@chromium.org
BUG=v8:5799

Review-Url: https://codereview.chromium.org/2612903002
Cr-Commit-Position: refs/heads/master@{#42098}
parent 1bc48138
......@@ -1470,8 +1470,12 @@ void BytecodeGenerator::VisitClassLiteralProperties(ClassLiteral* expr,
old_receiver = new_receiver;
}
if (property->key()->IsStringLiteral()) {
VisitForRegisterValue(property->key(), key);
} else {
VisitForAccumulatorValue(property->key());
builder()->ConvertAccumulatorToName(key);
}
if (property->is_static() && property->is_computed_name()) {
// The static prototype property is read only. We handle the non computed
......
......@@ -33,7 +33,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
B(Star), R(4),
B(LdaConstant), U8(1),
B(ToName), R(6),
B(Star), R(6),
B(CreateClosure), U8(2), U8(2),
B(Star), R(7),
B(LdaSmi), U8(2),
......@@ -84,7 +84,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
B(Star), R(4),
B(LdaConstant), U8(1),
B(ToName), R(6),
B(Star), R(6),
B(CreateClosure), U8(2), U8(2),
B(Star), R(7),
B(LdaSmi), U8(2),
......@@ -263,7 +263,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
B(Star), R(5),
B(LdaConstant), U8(2),
B(ToName), R(7),
B(Star), R(7),
B(CreateClosure), U8(3), U8(2),
B(Star), R(8),
B(LdaSmi), U8(2),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment