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

Side by Side Diff: src/ic/ic.cc

Issue 2127583002: [runtime] Better encapsulation of dictionary objects handling in lookup iterator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/mips/handler-compiler-mips.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/ic/ic.h" 5 #include "src/ic/ic.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-arguments-inl.h" 8 #include "src/api-arguments-inl.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 1748
1749 // This is currently guaranteed by checks in StoreIC::Store. 1749 // This is currently guaranteed by checks in StoreIC::Store.
1750 Handle<JSObject> receiver = Handle<JSObject>::cast(lookup->GetReceiver()); 1750 Handle<JSObject> receiver = Handle<JSObject>::cast(lookup->GetReceiver());
1751 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); 1751 Handle<JSObject> holder = lookup->GetHolder<JSObject>();
1752 DCHECK(!receiver->IsAccessCheckNeeded() || lookup->name()->IsPrivate()); 1752 DCHECK(!receiver->IsAccessCheckNeeded() || lookup->name()->IsPrivate());
1753 1753
1754 switch (lookup->state()) { 1754 switch (lookup->state()) {
1755 case LookupIterator::TRANSITION: { 1755 case LookupIterator::TRANSITION: {
1756 auto store_target = lookup->GetStoreTarget(); 1756 auto store_target = lookup->GetStoreTarget();
1757 if (store_target->IsJSGlobalObject()) { 1757 if (store_target->IsJSGlobalObject()) {
1758 // TODO(dcarney): this currently just deopts. Use the transition cell.
1759 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreGlobalTransition); 1758 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreGlobalTransition);
1760 auto cell = isolate()->factory()->NewPropertyCell(); 1759 Handle<PropertyCell> cell = lookup->transition_cell();
1761 cell->set_value(*value); 1760 cell->set_value(*value);
1762 auto code = PropertyCellStoreHandler( 1761 Handle<Code> code = PropertyCellStoreHandler(
1763 isolate(), store_target, Handle<JSGlobalObject>::cast(store_target), 1762 isolate(), store_target, Handle<JSGlobalObject>::cast(store_target),
1764 lookup->name(), cell, PropertyCellType::kConstant); 1763 lookup->name(), cell, PropertyCellType::kConstant);
1765 cell->set_value(isolate()->heap()->the_hole_value()); 1764 cell->set_value(isolate()->heap()->the_hole_value());
1766 return code; 1765 return code;
1767 } 1766 }
1768 Handle<Map> transition = lookup->transition_map(); 1767 Handle<Map> transition = lookup->transition_map();
1769 // Currently not handled by CompileStoreTransition. 1768 // Currently not handled by CompileStoreTransition.
1770 DCHECK(holder->HasFastProperties()); 1769 DCHECK(holder->HasFastProperties());
1771 1770
1772 DCHECK(lookup->IsCacheableTransition()); 1771 DCHECK(lookup->IsCacheableTransition());
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
3014 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, 3013 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC,
3015 vector->GetKind(vector_slot)); 3014 vector->GetKind(vector_slot));
3016 KeyedLoadICNexus nexus(vector, vector_slot); 3015 KeyedLoadICNexus nexus(vector, vector_slot);
3017 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 3016 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
3018 ic.UpdateState(receiver, key); 3017 ic.UpdateState(receiver, key);
3019 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); 3018 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key));
3020 } 3019 }
3021 } 3020 }
3022 } // namespace internal 3021 } // namespace internal
3023 } // namespace v8 3022 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698