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

Unified Diff: src/builtins/builtins-array.cc

Issue 2610343002: Fix: KeyedStoreGeneric must check for writable array length (Closed)
Patch Set: introduce IsSetSmi(smi, mask) Created 3 years, 11 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 | « no previous file | src/code-stub-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-array.cc
diff --git a/src/builtins/builtins-array.cc b/src/builtins/builtins-array.cc
index 22953106608b23822d16ebd23840d52a343d4e45..526e606d4cd6ab02d48b2d8f32afb7f4fd1c70eb 100644
--- a/src/builtins/builtins-array.cc
+++ b/src/builtins/builtins-array.cc
@@ -239,10 +239,9 @@ void Builtins::Generate_FastArrayPush(compiler::CodeAssemblerState* state) {
Node* descriptors = assembler.LoadMapDescriptors(map);
Node* details = assembler.LoadFixedArrayElement(
descriptors, DescriptorArray::ToDetailsIndex(0));
- mask = READ_ONLY << PropertyDetails::AttributesField::kShift;
- Node* mask_node = assembler.SmiConstant(mask);
- test = assembler.SmiAnd(details, mask_node);
- assembler.GotoIf(assembler.WordEqual(test, mask_node), &runtime);
+ assembler.GotoIf(
+ assembler.IsSetSmi(details, PropertyDetails::kAttributesReadOnlyMask),
+ &runtime);
arg_index.Bind(assembler.IntPtrConstant(0));
kind = assembler.DecodeWord32<Map::ElementsKindBits>(bit_field2);
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698