[cleanup] Merge DefineAsConstant functions

Change-Id: I9e9cc357cdadf81e8689b54626cff5ccdda2aa41
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1700437
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62693}
This commit is contained in:
Deepti Gandluri 2019-07-12 15:08:52 -07:00 committed by Commit Bot
parent 6d73ced600
commit 9182f9d7dd

View File

@ -109,13 +109,9 @@ class OperandGenerator {
}
InstructionOperand DefineAsConstant(Node* node) {
return DefineAsConstant(node, ToConstant(node));
}
InstructionOperand DefineAsConstant(Node* node, Constant constant) {
selector()->MarkAsDefined(node);
int virtual_register = GetVReg(node);
sequence()->AddConstant(virtual_register, constant);
sequence()->AddConstant(virtual_register, ToConstant(node));
return ConstantOperand(virtual_register);
}