Reviewers: dstence, Igor Sheludko, michael_dawson,
Description:
PPC: Cross-script variables handling fixed. It was possible to write to
read-only global variable.
Port 156042f7f71effd101fbfb2ca1b5a2c3aec62079
[email protected], [email protected], [email protected]
BUG=
Please review this at https://codereview.chromium.org/1259583003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+5, -1 lines):
M src/ppc/code-stubs-ppc.cc
Index: src/ppc/code-stubs-ppc.cc
diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc
index
62cc5711b24bb2df54f693c2dbdf631c391038ec..d7ed0088ae9f557bf3e9b4f2a2f721919348169f
100644
--- a/src/ppc/code-stubs-ppc.cc
+++ b/src/ppc/code-stubs-ppc.cc
@@ -5377,6 +5377,11 @@ void
StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ add(cell, context, cell);
__ 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(¬_same_value);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.