Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 2084623002: Reland: [Interpreter] Map runtime id's to intrinsic id's in InvokeIntrinsic bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reland Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-array-iterator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index cf49292fa4be6f0347c4eb2937425de2facb9141..721c321287669ac39b2b97d3f7a141c003388a4e 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -581,11 +581,16 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime(
DCHECK_EQ(0u, arg_count);
first_arg = Register(0);
}
- Bytecode bytecode = IntrinsicsHelper::IsSupported(function_id)
- ? Bytecode::kInvokeIntrinsic
- : Bytecode::kCallRuntime;
- Output(bytecode, static_cast<uint16_t>(function_id),
- RegisterOperand(first_arg), UnsignedOperand(arg_count));
+ Bytecode bytecode;
+ uint32_t id;
+ if (IntrinsicsHelper::IsSupported(function_id)) {
+ bytecode = Bytecode::kInvokeIntrinsic;
+ id = static_cast<uint32_t>(IntrinsicsHelper::FromRuntimeId(function_id));
+ } else {
+ bytecode = Bytecode::kCallRuntime;
+ id = static_cast<uint32_t>(function_id);
+ }
+ Output(bytecode, id, RegisterOperand(first_arg), UnsignedOperand(arg_count));
return *this;
}
@@ -694,6 +699,7 @@ bool BytecodeArrayBuilder::OperandsAreValid(
break;
}
case OperandType::kFlag8:
+ case OperandType::kIntrinsicId:
if (Bytecodes::SizeForUnsignedOperand(operands[i]) >
OperandSize::kByte) {
return false;
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-array-iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698