Commit ee70ad1b authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: Cross-script variables handling fixed. It was possible to write to read-only global variable.

Port 156042f7

R=ishell@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1259583003

Cr-Commit-Position: refs/heads/master@{#29880}
parent b8adca96
......@@ -5377,6 +5377,11 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ add(cell, context, r0);
__ LoadP(cell, ContextOperand(cell));
// Check that cell value is not the_hole.
__ LoadP(cell_value, FieldMemOperand(cell, PropertyCell::kValueOffset));
__ CompareRoot(cell_value, Heap::kTheHoleValueRootIndex);
__ beq(&slow_case);
// Load PropertyDetails for the cell (actually only the cell_type and kind).
__ LoadP(cell_details, FieldMemOperand(cell, PropertyCell::kDetailsOffset));
__ SmiUntag(cell_details);
......@@ -5406,7 +5411,6 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
// Check if PropertyCell value matches the new value (relevant for Constant,
// ConstantType and Undefined cells).
Label not_same_value;
__ LoadP(cell_value, FieldMemOperand(cell, PropertyCell::kValueOffset));
__ cmp(cell_value, value);
__ bne(&not_same_value);
......
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