Update construct bytecode handlers to work without feedback vectors

Bug: v8:8394
Change-Id: If9af9f3c79e442f6e384934e005ae5d82b0d358b
Reviewed-on: https://chromium-review.googlesource.com/c/1365277
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58070}
This commit is contained in:
Mythri 2018-12-06 12:24:03 +00:00 committed by Commit Bot
parent d8b59fc60d
commit 84b9e927a7
2 changed files with 4 additions and 2 deletions

View File

@ -940,6 +940,7 @@ Node* InterpreterAssembler::Construct(Node* target, Node* context,
VARIABLE(var_site, MachineRepresentation::kTagged);
Label extra_checks(this, Label::kDeferred), return_result(this, &var_result),
construct(this), construct_array(this, &var_site);
GotoIf(IsUndefined(feedback_vector), &construct);
// Increment the call count.
IncrementCallCount(feedback_vector, slot_id);
@ -1120,6 +1121,7 @@ Node* InterpreterAssembler::ConstructWithSpread(Node* target, Node* context,
// constructor _and_ spread the last argument at the same time.
DCHECK(Bytecodes::MakesCallAlongCriticalPath(bytecode_));
Label extra_checks(this, Label::kDeferred), construct(this);
GotoIf(IsUndefined(feedback_vector), &construct);
// Increment the call count.
IncrementCallCount(feedback_vector, slot_id);

View File

@ -1730,7 +1730,7 @@ IGNITION_HANDLER(ConstructWithSpread, InterpreterAssembler) {
Node* constructor = LoadRegisterAtOperandIndex(0);
RegListNodePair args = GetRegisterListAtOperandIndex(1);
Node* slot_id = BytecodeOperandIdx(3);
Node* feedback_vector = LoadFeedbackVector();
Node* feedback_vector = LoadFeedbackVectorUnchecked();
Node* context = GetContext();
Node* result = ConstructWithSpread(constructor, context, new_target, args,
slot_id, feedback_vector);
@ -1749,7 +1749,7 @@ IGNITION_HANDLER(Construct, InterpreterAssembler) {
Node* constructor = LoadRegisterAtOperandIndex(0);
RegListNodePair args = GetRegisterListAtOperandIndex(1);
Node* slot_id = BytecodeOperandIdx(3);
Node* feedback_vector = LoadFeedbackVector();
Node* feedback_vector = LoadFeedbackVectorUnchecked();
Node* context = GetContext();
Node* result = Construct(constructor, context, new_target, args, slot_id,
feedback_vector);