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

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

Issue 1636013002: Replace HeapType with a non-templated FieldType class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tracing of generalizations Created 4 years, 10 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
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.h" 8 #include "src/api.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 } 1790 }
1791 DCHECK(holder.is_identical_to(receiver)); 1791 DCHECK(holder.is_identical_to(receiver));
1792 return isolate()->builtins()->StoreIC_Normal(); 1792 return isolate()->builtins()->StoreIC_Normal();
1793 } 1793 }
1794 1794
1795 // -------------- Fields -------------- 1795 // -------------- Fields --------------
1796 if (lookup->property_details().type() == DATA) { 1796 if (lookup->property_details().type() == DATA) {
1797 bool use_stub = true; 1797 bool use_stub = true;
1798 if (lookup->representation().IsHeapObject()) { 1798 if (lookup->representation().IsHeapObject()) {
1799 // Only use a generic stub if no types need to be tracked. 1799 // Only use a generic stub if no types need to be tracked.
1800 Handle<HeapType> field_type = lookup->GetFieldType(); 1800 Handle<FieldType> field_type = lookup->GetFieldType();
1801 HeapType::Iterator<Map> it = field_type->Classes(); 1801 FieldType::Iterator it = field_type->Classes();
Benedikt Meurer 2016/01/26 14:22:47 No Iterator please.
1802 use_stub = it.Done(); 1802 use_stub = it.Done();
1803 } 1803 }
1804 if (use_stub) { 1804 if (use_stub) {
1805 StoreFieldStub stub(isolate(), lookup->GetFieldIndex(), 1805 StoreFieldStub stub(isolate(), lookup->GetFieldIndex(),
1806 lookup->representation()); 1806 lookup->representation());
1807 return stub.GetCode(); 1807 return stub.GetCode();
1808 } 1808 }
1809 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); 1809 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder);
1810 return compiler.CompileStoreField(lookup); 1810 return compiler.CompileStoreField(lookup);
1811 } 1811 }
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2974 KeyedLoadICNexus nexus(vector, vector_slot); 2974 KeyedLoadICNexus nexus(vector, vector_slot);
2975 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 2975 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
2976 ic.UpdateState(receiver, key); 2976 ic.UpdateState(receiver, key);
2977 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); 2977 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2978 } 2978 }
2979 2979
2980 return *result; 2980 return *result;
2981 } 2981 }
2982 } // namespace internal 2982 } // namespace internal
2983 } // namespace v8 2983 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698