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

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

Issue 2444353002: [stubs] Port KeyedStoreIC_Megamorphic stub to Turbofan (Closed)
Patch Set: polishing Created 4 years, 1 month 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
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 <iostream> 7 #include <iostream>
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/api-arguments-inl.h" 10 #include "src/api-arguments-inl.h"
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 vector_set_ = true; 826 vector_set_ = true;
827 break; 827 break;
828 case GENERIC: 828 case GENERIC:
829 UNREACHABLE(); 829 UNREACHABLE();
830 break; 830 break;
831 } 831 }
832 } 832 }
833 833
834 Handle<Code> KeyedStoreIC::ChooseMegamorphicStub(Isolate* isolate, 834 Handle<Code> KeyedStoreIC::ChooseMegamorphicStub(Isolate* isolate,
835 ExtraICState extra_state) { 835 ExtraICState extra_state) {
836 DCHECK(!FLAG_tf_store_ic_stub);
836 LanguageMode mode = StoreICState::GetLanguageMode(extra_state); 837 LanguageMode mode = StoreICState::GetLanguageMode(extra_state);
837 return is_strict(mode) 838 return is_strict(mode)
838 ? isolate->builtins()->KeyedStoreIC_Megamorphic_Strict() 839 ? isolate->builtins()->KeyedStoreIC_Megamorphic_Strict()
839 : isolate->builtins()->KeyedStoreIC_Megamorphic(); 840 : isolate->builtins()->KeyedStoreIC_Megamorphic();
840 } 841 }
841 842
842 Handle<Object> LoadIC::SimpleFieldLoad(FieldIndex index) { 843 Handle<Object> LoadIC::SimpleFieldLoad(FieldIndex index) {
843 if (FLAG_tf_load_ic_stub) { 844 if (FLAG_tf_load_ic_stub) {
844 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldDH); 845 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldDH);
845 return LoadHandler::LoadField(isolate(), index); 846 return LoadHandler::LoadField(isolate(), index);
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 !String::cast(*key)->AsArrayIndex(&index)) || 1665 !String::cast(*key)->AsArrayIndex(&index)) ||
1665 key->IsSymbol()) { 1666 key->IsSymbol()) {
1666 ASSIGN_RETURN_ON_EXCEPTION(isolate(), load_handle, 1667 ASSIGN_RETURN_ON_EXCEPTION(isolate(), load_handle,
1667 LoadIC::Load(object, Handle<Name>::cast(key)), 1668 LoadIC::Load(object, Handle<Name>::cast(key)),
1668 Object); 1669 Object);
1669 } else if (FLAG_use_ic && !object->IsAccessCheckNeeded() && 1670 } else if (FLAG_use_ic && !object->IsAccessCheckNeeded() &&
1670 !object->IsJSValue()) { 1671 !object->IsJSValue()) {
1671 if ((object->IsJSObject() && key->IsSmi()) || 1672 if ((object->IsJSObject() && key->IsSmi()) ||
1672 (object->IsString() && key->IsNumber())) { 1673 (object->IsString() && key->IsNumber())) {
1673 UpdateLoadElement(Handle<HeapObject>::cast(object)); 1674 UpdateLoadElement(Handle<HeapObject>::cast(object));
1674 TRACE_IC("LoadIC", key); 1675 if (is_vector_set()) {
Jakob Kummerow 2016/11/04 18:58:26 Drive-by fix.
1676 TRACE_IC("LoadIC", key);
1677 }
1675 } 1678 }
1676 } 1679 }
1677 1680
1678 if (!is_vector_set()) { 1681 if (!is_vector_set()) {
1679 ConfigureVectorState(MEGAMORPHIC, key); 1682 ConfigureVectorState(MEGAMORPHIC, key);
1680 TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic"); 1683 TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic");
1681 TRACE_IC("LoadIC", key); 1684 TRACE_IC("LoadIC", key);
1682 } 1685 }
1683 1686
1684 if (!load_handle.is_null()) return load_handle; 1687 if (!load_handle.is_null()) return load_handle;
(...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
3172 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); 3175 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state());
3173 it.Next(); 3176 it.Next();
3174 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 3177 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
3175 Object::GetProperty(&it)); 3178 Object::GetProperty(&it));
3176 } 3179 }
3177 3180
3178 return *result; 3181 return *result;
3179 } 3182 }
3180 } // namespace internal 3183 } // namespace internal
3181 } // namespace v8 3184 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698