Commit ed45f590 authored by adamk's avatar adamk Committed by Commit bot

Fix bad reinterpret_cast of StringFromCodePointOperator

StringFromCodePointOperator needed to derive from Operator1<UnicodeEncoding>
rather than plain old Operator. This was thankfully caught by the CFI build.

R=bmeurer@chromium.org, caitp@chromium.org
BUG=v8:5498

Review-Url: https://codereview.chromium.org/2398403003
Cr-Commit-Position: refs/heads/master@{#40131}
parent 7d336218
......@@ -474,10 +474,11 @@ struct SimplifiedOperatorGlobalCache final {
#undef CHECKED
template <UnicodeEncoding kEncoding>
struct StringFromCodePointOperator final : public Operator {
struct StringFromCodePointOperator final : public Operator1<UnicodeEncoding> {
StringFromCodePointOperator()
: Operator(IrOpcode::kStringFromCodePoint, Operator::kPure,
"StringFromCodePoint", 1, 0, 0, 1, 0, 0) {}
: Operator1<UnicodeEncoding>(IrOpcode::kStringFromCodePoint,
Operator::kPure, "StringFromCodePoint", 1,
0, 0, 1, 0, 0, kEncoding) {}
};
StringFromCodePointOperator<UnicodeEncoding::UTF16>
kStringFromCodePointOperatorUTF16;
......
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