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

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

Issue 2444353002: [stubs] Port KeyedStoreIC_Megamorphic stub to Turbofan (Closed)
Patch Set: rebased 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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 !String::cast(*key)->AsArrayIndex(&index)) || 1707 !String::cast(*key)->AsArrayIndex(&index)) ||
1707 key->IsSymbol()) { 1708 key->IsSymbol()) {
1708 ASSIGN_RETURN_ON_EXCEPTION(isolate(), load_handle, 1709 ASSIGN_RETURN_ON_EXCEPTION(isolate(), load_handle,
1709 LoadIC::Load(object, Handle<Name>::cast(key)), 1710 LoadIC::Load(object, Handle<Name>::cast(key)),
1710 Object); 1711 Object);
1711 } else if (FLAG_use_ic && !object->IsAccessCheckNeeded() && 1712 } else if (FLAG_use_ic && !object->IsAccessCheckNeeded() &&
1712 !object->IsJSValue()) { 1713 !object->IsJSValue()) {
1713 if ((object->IsJSObject() && key->IsSmi()) || 1714 if ((object->IsJSObject() && key->IsSmi()) ||
1714 (object->IsString() && key->IsNumber())) { 1715 (object->IsString() && key->IsNumber())) {
1715 UpdateLoadElement(Handle<HeapObject>::cast(object)); 1716 UpdateLoadElement(Handle<HeapObject>::cast(object));
1716 TRACE_IC("LoadIC", key); 1717 if (is_vector_set()) {
1718 TRACE_IC("LoadIC", key);
1719 }
1717 } 1720 }
1718 } 1721 }
1719 1722
1720 if (!is_vector_set()) { 1723 if (!is_vector_set()) {
1721 ConfigureVectorState(MEGAMORPHIC, key); 1724 ConfigureVectorState(MEGAMORPHIC, key);
1722 TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic"); 1725 TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic");
1723 TRACE_IC("LoadIC", key); 1726 TRACE_IC("LoadIC", key);
1724 } 1727 }
1725 1728
1726 if (!load_handle.is_null()) return load_handle; 1729 if (!load_handle.is_null()) return load_handle;
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
3213 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); 3216 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state());
3214 it.Next(); 3217 it.Next();
3215 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 3218 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
3216 Object::GetProperty(&it)); 3219 Object::GetProperty(&it));
3217 } 3220 }
3218 3221
3219 return *result; 3222 return *result;
3220 } 3223 }
3221 } // namespace internal 3224 } // namespace internal
3222 } // namespace v8 3225 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698