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

Side by Side Diff: src/code-stubs.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 | « src/code-stub-assembler.cc ('k') | src/ic/accessor-assembler.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 2110
2111 assembler.Comment("StoreScriptContextFieldStub: context_index=%d, slot=%d", 2111 assembler.Comment("StoreScriptContextFieldStub: context_index=%d, slot=%d",
2112 context_index(), slot_index()); 2112 context_index(), slot_index());
2113 2113
2114 Node* value = assembler.Parameter(Descriptor::kValue); 2114 Node* value = assembler.Parameter(Descriptor::kValue);
2115 Node* context = assembler.Parameter(Descriptor::kContext); 2115 Node* context = assembler.Parameter(Descriptor::kContext);
2116 2116
2117 Node* script_context = assembler.LoadScriptContext(context, context_index()); 2117 Node* script_context = assembler.LoadScriptContext(context, context_index());
2118 assembler.StoreFixedArrayElement( 2118 assembler.StoreFixedArrayElement(
2119 script_context, assembler.IntPtrConstant(slot_index()), value, 2119 script_context, assembler.IntPtrConstant(slot_index()), value,
2120 UPDATE_WRITE_BARRIER, CodeStubAssembler::INTPTR_PARAMETERS); 2120 UPDATE_WRITE_BARRIER, 0, CodeStubAssembler::INTPTR_PARAMETERS);
2121 assembler.Return(value); 2121 assembler.Return(value);
2122 } 2122 }
2123 2123
2124 void StoreInterceptorStub::GenerateAssembly( 2124 void StoreInterceptorStub::GenerateAssembly(
2125 compiler::CodeAssemblerState* state) const { 2125 compiler::CodeAssemblerState* state) const {
2126 typedef compiler::Node Node; 2126 typedef compiler::Node Node;
2127 CodeStubAssembler assembler(state); 2127 CodeStubAssembler assembler(state);
2128 2128
2129 Node* receiver = assembler.Parameter(Descriptor::kReceiver); 2129 Node* receiver = assembler.Parameter(Descriptor::kReceiver);
2130 Node* name = assembler.Parameter(Descriptor::kName); 2130 Node* name = assembler.Parameter(Descriptor::kName);
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
2614 2614
2615 Isolate* isolate = assembler->isolate(); 2615 Isolate* isolate = assembler->isolate();
2616 assembler->StoreMapNoWriteBarrier( 2616 assembler->StoreMapNoWriteBarrier(
2617 function_context, 2617 function_context,
2618 assembler->HeapConstant(isolate->factory()->function_context_map())); 2618 assembler->HeapConstant(isolate->factory()->function_context_map()));
2619 assembler->StoreObjectFieldNoWriteBarrier(function_context, 2619 assembler->StoreObjectFieldNoWriteBarrier(function_context,
2620 Context::kLengthOffset, 2620 Context::kLengthOffset,
2621 assembler->SmiFromWord32(length)); 2621 assembler->SmiFromWord32(length));
2622 2622
2623 // Set up the fixed slots. 2623 // Set up the fixed slots.
2624 assembler->StoreFixedArrayElement( 2624 assembler->StoreFixedArrayElement(function_context, Context::CLOSURE_INDEX,
2625 function_context, assembler->Int32Constant(Context::CLOSURE_INDEX), 2625 function, SKIP_WRITE_BARRIER);
2626 function, SKIP_WRITE_BARRIER); 2626 assembler->StoreFixedArrayElement(function_context, Context::PREVIOUS_INDEX,
2627 assembler->StoreFixedArrayElement( 2627 context, SKIP_WRITE_BARRIER);
2628 function_context, assembler->Int32Constant(Context::PREVIOUS_INDEX), 2628 assembler->StoreFixedArrayElement(function_context, Context::EXTENSION_INDEX,
2629 context, SKIP_WRITE_BARRIER); 2629 assembler->TheHoleConstant(),
2630 assembler->StoreFixedArrayElement( 2630 SKIP_WRITE_BARRIER);
2631 function_context, assembler->Int32Constant(Context::EXTENSION_INDEX),
2632 assembler->TheHoleConstant(), SKIP_WRITE_BARRIER);
2633 2631
2634 // Copy the native context from the previous context. 2632 // Copy the native context from the previous context.
2635 Node* native_context = assembler->LoadNativeContext(context); 2633 Node* native_context = assembler->LoadNativeContext(context);
2636 assembler->StoreFixedArrayElement( 2634 assembler->StoreFixedArrayElement(function_context,
2637 function_context, assembler->Int32Constant(Context::NATIVE_CONTEXT_INDEX), 2635 Context::NATIVE_CONTEXT_INDEX,
2638 native_context, SKIP_WRITE_BARRIER); 2636 native_context, SKIP_WRITE_BARRIER);
2639 2637
2640 // Initialize the rest of the slots to undefined. 2638 // Initialize the rest of the slots to undefined.
2641 Node* undefined = assembler->UndefinedConstant(); 2639 Node* undefined = assembler->UndefinedConstant();
2642 assembler->BuildFastFixedArrayForEach( 2640 assembler->BuildFastFixedArrayForEach(
2643 function_context, FAST_ELEMENTS, min_context_slots, length, 2641 function_context, FAST_ELEMENTS, min_context_slots, length,
2644 [undefined](CodeStubAssembler* assembler, Node* context, Node* offset) { 2642 [undefined](CodeStubAssembler* assembler, Node* context, Node* offset) {
2645 assembler->StoreNoWriteBarrier(MachineType::PointerRepresentation(), 2643 assembler->StoreNoWriteBarrier(MachineType::PointerRepresentation(),
2646 context, offset, undefined); 2644 context, offset, undefined);
2647 }); 2645 });
2648 2646
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
3214 } 3212 }
3215 3213
3216 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) 3214 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate)
3217 : PlatformCodeStub(isolate) {} 3215 : PlatformCodeStub(isolate) {}
3218 3216
3219 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) 3217 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate)
3220 : PlatformCodeStub(isolate) {} 3218 : PlatformCodeStub(isolate) {}
3221 3219
3222 } // namespace internal 3220 } // namespace internal
3223 } // namespace v8 3221 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/ic/accessor-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698