OLD | NEW |
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 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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<FieldType> field_type = lookup->GetFieldType(); | 1800 Handle<FieldType> field_type = lookup->GetFieldType(); |
1801 FieldType::Iterator it = field_type->Classes(); | 1801 use_stub = !field_type->IsClass(); |
1802 use_stub = it.Done(); | |
1803 } | 1802 } |
1804 if (use_stub) { | 1803 if (use_stub) { |
1805 StoreFieldStub stub(isolate(), lookup->GetFieldIndex(), | 1804 StoreFieldStub stub(isolate(), lookup->GetFieldIndex(), |
1806 lookup->representation()); | 1805 lookup->representation()); |
1807 return stub.GetCode(); | 1806 return stub.GetCode(); |
1808 } | 1807 } |
1809 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); | 1808 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); |
1810 return compiler.CompileStoreField(lookup); | 1809 return compiler.CompileStoreField(lookup); |
1811 } | 1810 } |
1812 | 1811 |
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2974 KeyedLoadICNexus nexus(vector, vector_slot); | 2973 KeyedLoadICNexus nexus(vector, vector_slot); |
2975 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 2974 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); |
2976 ic.UpdateState(receiver, key); | 2975 ic.UpdateState(receiver, key); |
2977 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); | 2976 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); |
2978 } | 2977 } |
2979 | 2978 |
2980 return *result; | 2979 return *result; |
2981 } | 2980 } |
2982 } // namespace internal | 2981 } // namespace internal |
2983 } // namespace v8 | 2982 } // namespace v8 |
OLD | NEW |