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

Side by Side Diff: src/builtins/builtins-array.cc

Issue 2528883003: Reland of [stubs] KeyedStoreGeneric: inline dictionary property stores (Closed)
Patch Set: fix for deleted-elements issue Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/builtins/builtins-regexp.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/builtins/builtins.h" 5 #include "src/builtins/builtins.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 7
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/contexts.h" 9 #include "src/contexts.h"
10 #include "src/elements.h" 10 #include "src/elements.h"
(...skipping 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after
2559 assembler.Bind(&allocate_entry_if_needed); 2559 assembler.Bind(&allocate_entry_if_needed);
2560 { 2560 {
2561 assembler.GotoIf( 2561 assembler.GotoIf(
2562 assembler.Int32GreaterThan( 2562 assembler.Int32GreaterThan(
2563 instance_type, 2563 instance_type,
2564 assembler.Int32Constant(LAST_ARRAY_KEY_VALUE_ITERATOR_TYPE)), 2564 assembler.Int32Constant(LAST_ARRAY_KEY_VALUE_ITERATOR_TYPE)),
2565 &allocate_iterator_result); 2565 &allocate_iterator_result);
2566 2566
2567 Node* elements = 2567 Node* elements =
2568 assembler.AllocateFixedArray(FAST_ELEMENTS, assembler.Int32Constant(2)); 2568 assembler.AllocateFixedArray(FAST_ELEMENTS, assembler.Int32Constant(2));
2569 assembler.StoreFixedArrayElement(elements, assembler.Int32Constant(0), 2569 assembler.StoreFixedArrayElement(elements, 0, index, SKIP_WRITE_BARRIER);
2570 index, SKIP_WRITE_BARRIER); 2570 assembler.StoreFixedArrayElement(elements, 1, var_value.value(),
2571 assembler.StoreFixedArrayElement(elements, assembler.Int32Constant(1), 2571 SKIP_WRITE_BARRIER);
2572 var_value.value(), SKIP_WRITE_BARRIER);
2573 2572
2574 Node* entry = assembler.Allocate(JSArray::kSize); 2573 Node* entry = assembler.Allocate(JSArray::kSize);
2575 Node* map = 2574 Node* map =
2576 assembler.LoadContextElement(assembler.LoadNativeContext(context), 2575 assembler.LoadContextElement(assembler.LoadNativeContext(context),
2577 Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX); 2576 Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX);
2578 2577
2579 assembler.StoreMapNoWriteBarrier(entry, map); 2578 assembler.StoreMapNoWriteBarrier(entry, map);
2580 assembler.StoreObjectFieldRoot(entry, JSArray::kPropertiesOffset, 2579 assembler.StoreObjectFieldRoot(entry, JSArray::kPropertiesOffset,
2581 Heap::kEmptyFixedArrayRootIndex); 2580 Heap::kEmptyFixedArrayRootIndex);
2582 assembler.StoreObjectFieldNoWriteBarrier(entry, JSArray::kElementsOffset, 2581 assembler.StoreObjectFieldNoWriteBarrier(entry, JSArray::kElementsOffset,
(...skipping 30 matching lines...) Expand all
2613 Runtime::kThrowIncompatibleMethodReceiver, context, 2612 Runtime::kThrowIncompatibleMethodReceiver, context,
2614 assembler.HeapConstant(assembler.factory()->NewStringFromAsciiChecked( 2613 assembler.HeapConstant(assembler.factory()->NewStringFromAsciiChecked(
2615 "Array Iterator.prototype.next", TENURED)), 2614 "Array Iterator.prototype.next", TENURED)),
2616 iterator); 2615 iterator);
2617 assembler.Return(result); 2616 assembler.Return(result);
2618 } 2617 }
2619 } 2618 }
2620 2619
2621 } // namespace internal 2620 } // namespace internal
2622 } // namespace v8 2621 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698