Commit 3b1691be authored by jyan's avatar jyan Committed by Commit bot

Fix Endian issue in interpreter in EmitBytecode

R=rmcilroy@chromium.org, mythria@chromium.org, leszeks@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2362453003
Cr-Commit-Position: refs/heads/master@{#39644}
parent 68ee0a4f
......@@ -125,8 +125,8 @@ void BytecodeArrayWriter::EmitBytecode(const BytecodeNode* const node) {
bytecodes()->push_back(static_cast<uint8_t>(operands[i]));
break;
case OperandSize::kShort: {
const uint8_t* raw_operand =
reinterpret_cast<const uint8_t*>(&operands[i]);
uint16_t operand = static_cast<uint16_t>(operands[i]);
const uint8_t* raw_operand = reinterpret_cast<const uint8_t*>(&operand);
bytecodes()->push_back(raw_operand[0]);
bytecodes()->push_back(raw_operand[1]);
break;
......
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