Commit 3c6bbe07 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Funnel class constructors through TurboFan.

This makes optimization of all class constructors (i.e. both base and
derived) go through TurboFan. Note some class constructors containing
Harmony language features (e.g. super constructor calls or accesses to
the new.target value) were already going through TurboFan before.

R=bmeurer@chromium.org
BUG=v8:5458

Review-Url: https://codereview.chromium.org/2397723002
Cr-Commit-Position: refs/heads/master@{#40342}
parent 87ae05c7
......@@ -600,6 +600,10 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
}
}
if (IsClassConstructor(node->kind())) {
DisableCrankshaft(kClassConstructorFunction);
}
VisitDeclarations(scope->declarations());
VisitStatements(node->body());
......
......@@ -35,6 +35,7 @@ namespace internal {
V(kBailoutWasNotPrepared, "Bailout was not prepared") \
V(kBothRegistersWereSmisInSelectNonSmi, \
"Both registers were smis in SelectNonSmi") \
V(kClassConstructorFunction, "Class constructor function") \
V(kClassLiteral, "Class literal") \
V(kCodeGenerationFailed, "Code generation failed") \
V(kCodeObjectNotProperlyPatched, "Code object not properly patched") \
......
......@@ -22,7 +22,7 @@ bytecodes: [
B(LdaZero),
B(TestEqualStrict), R(1), U8(0),
B(JumpIfTrue), U8(61),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(2),
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), U8(-2),
......@@ -130,7 +130,7 @@ bytecodes: [
B(LdaSmi), U8(1),
B(TestEqualStrict), R(1), U8(0),
B(JumpIfTrueConstant), U8(0),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(2),
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), U8(-2),
......@@ -278,7 +278,7 @@ bytecodes: [
B(LdaSmi), U8(1),
B(TestEqualStrict), R(4), U8(0),
B(JumpIfTrueConstant), U8(3),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(5),
B(CallRuntime), U16(Runtime::kAbort), R(5), U8(1),
B(LdaSmi), U8(-2),
......@@ -344,7 +344,7 @@ bytecodes: [
B(LdaSmi), U8(1),
B(TestEqualStrict), R(4), U8(0),
B(JumpIfTrueConstant), U8(9),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(12),
B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
/* 27 S> */ B(LdrContextSlot), R(1), U8(7), U8(0), R(14),
......
......@@ -22,7 +22,7 @@ bytecodes: [
B(LdaZero),
B(TestEqualStrict), R(1), U8(0),
B(JumpIfTrue), U8(71),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(2),
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), U8(-2),
......@@ -91,7 +91,7 @@ bytecodes: [
B(LdaZero),
B(TestEqualStrict), R(1), U8(0),
B(JumpIfTrue), U8(71),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(2),
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), U8(-2),
......@@ -162,7 +162,7 @@ bytecodes: [
B(LdaZero),
B(TestEqualStrict), R(2), U8(0),
B(JumpIfTrue), U8(71),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(3),
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
B(LdaSmi), U8(-2),
......@@ -272,7 +272,7 @@ bytecodes: [
B(LdaZero),
B(TestEqualStrict), R(2), U8(0),
B(JumpIfTrue), U8(71),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(3),
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
B(LdaSmi), U8(-2),
......@@ -374,7 +374,7 @@ bytecodes: [
B(LdaZero),
B(TestEqualStrict), R(2), U8(0),
B(JumpIfTrue), U8(83),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(3),
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
B(LdaSmi), U8(-2),
......@@ -489,7 +489,7 @@ bytecodes: [
B(LdaZero),
B(TestEqualStrict), R(2), U8(0),
B(JumpIfTrue), U8(83),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(3),
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
B(LdaSmi), U8(-2),
......@@ -596,7 +596,7 @@ bytecodes: [
B(LdaZero),
B(TestEqualStrict), R(1), U8(0),
B(JumpIfTrue), U8(83),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(2),
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), U8(-2),
......@@ -677,7 +677,7 @@ bytecodes: [
B(LdaZero),
B(TestEqualStrict), R(1), U8(0),
B(JumpIfTrue), U8(83),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(2),
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), U8(-2),
......@@ -771,7 +771,7 @@ bytecodes: [
B(LdaZero),
B(TestEqualStrict), R(1), U8(0),
B(JumpIfTrue), U8(71),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(2),
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), U8(-2),
......@@ -840,7 +840,7 @@ bytecodes: [
B(LdaZero),
B(TestEqualStrict), R(1), U8(0),
B(JumpIfTrue), U8(71),
B(LdaSmi), U8(76),
B(LdaSmi), U8(77),
B(Star), R(2),
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
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