diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/v8/src/compiler/js-create-lowering.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/v8/src/compiler/js-create-lowering.cc')
-rw-r--r-- | chromium/v8/src/compiler/js-create-lowering.cc | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/chromium/v8/src/compiler/js-create-lowering.cc b/chromium/v8/src/compiler/js-create-lowering.cc index d0059030d50..9674a436adb 100644 --- a/chromium/v8/src/compiler/js-create-lowering.cc +++ b/chromium/v8/src/compiler/js-create-lowering.cc @@ -28,6 +28,7 @@ #include "src/objects/js-regexp-inl.h" #include "src/objects/objects-inl.h" #include "src/objects/template-objects.h" +#include "torque-generated/exported-class-definitions-tq.h" namespace v8 { namespace internal { @@ -1507,16 +1508,15 @@ Node* JSCreateLowering::AllocateAliasedArguments( // Actually allocate the backing store. AllocationBuilder a(jsgraph(), arguments, control); - a.AllocateArray(mapped_count + 2, - MapRef(broker(), factory()->sloppy_arguments_elements_map())); - a.Store(AccessBuilder::ForFixedArrayElement(), jsgraph()->Constant(0), - context); - a.Store(AccessBuilder::ForFixedArrayElement(), jsgraph()->Constant(1), - arguments); + a.AllocateSloppyArgumentElements( + mapped_count, + MapRef(broker(), factory()->sloppy_arguments_elements_map())); + a.Store(AccessBuilder::ForSloppyArgumentsElementsContext(), context); + a.Store(AccessBuilder::ForSloppyArgumentsElementsArguments(), arguments); for (int i = 0; i < mapped_count; ++i) { int idx = shared.context_header_size() + parameter_count - 1 - i; - a.Store(AccessBuilder::ForFixedArrayElement(), jsgraph()->Constant(i + 2), - jsgraph()->Constant(idx)); + a.Store(AccessBuilder::ForSloppyArgumentsElementsMappedEntry(), + jsgraph()->Constant(i), jsgraph()->Constant(idx)); } return a.Finish(); } @@ -1553,12 +1553,11 @@ Node* JSCreateLowering::AllocateAliasedArguments( // Actually allocate the backing store. AllocationBuilder a(jsgraph(), effect, control); - a.AllocateArray(mapped_count + 2, - MapRef(broker(), factory()->sloppy_arguments_elements_map())); - a.Store(AccessBuilder::ForFixedArrayElement(), jsgraph()->Constant(0), - context); - a.Store(AccessBuilder::ForFixedArrayElement(), jsgraph()->Constant(1), - arguments); + a.AllocateSloppyArgumentElements( + mapped_count, + MapRef(broker(), factory()->sloppy_arguments_elements_map())); + a.Store(AccessBuilder::ForSloppyArgumentsElementsContext(), context); + a.Store(AccessBuilder::ForSloppyArgumentsElementsArguments(), arguments); for (int i = 0; i < mapped_count; ++i) { int idx = shared.context_header_size() + parameter_count - 1 - i; Node* value = graph()->NewNode( @@ -1566,8 +1565,8 @@ Node* JSCreateLowering::AllocateAliasedArguments( graph()->NewNode(simplified()->NumberLessThan(), jsgraph()->Constant(i), arguments_length), jsgraph()->Constant(idx), jsgraph()->TheHoleConstant()); - a.Store(AccessBuilder::ForFixedArrayElement(), jsgraph()->Constant(i + 2), - value); + a.Store(AccessBuilder::ForSloppyArgumentsElementsMappedEntry(), + jsgraph()->Constant(i), value); } return a.Finish(); } |