| 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/v8.h" | 5 #include "src/v8.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 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 break; | 1725 break; |
| 1726 } | 1726 } |
| 1727 Handle<JSFunction> function = Handle<JSFunction>::cast(setter); | 1727 Handle<JSFunction> function = Handle<JSFunction>::cast(setter); |
| 1728 CallOptimization call_optimization(function); | 1728 CallOptimization call_optimization(function); |
| 1729 NamedStoreHandlerCompiler compiler(isolate(), receiver_type(), holder); | 1729 NamedStoreHandlerCompiler compiler(isolate(), receiver_type(), holder); |
| 1730 if (call_optimization.is_simple_api_call() && | 1730 if (call_optimization.is_simple_api_call() && |
| 1731 call_optimization.IsCompatibleReceiver(receiver, holder)) { | 1731 call_optimization.IsCompatibleReceiver(receiver, holder)) { |
| 1732 return compiler.CompileStoreCallback(receiver, lookup->name(), | 1732 return compiler.CompileStoreCallback(receiver, lookup->name(), |
| 1733 call_optimization); | 1733 call_optimization); |
| 1734 } | 1734 } |
| 1735 int expected_arguments = function->shared()->formal_parameter_count(); |
| 1735 return compiler.CompileStoreViaSetter(receiver, lookup->name(), | 1736 return compiler.CompileStoreViaSetter(receiver, lookup->name(), |
| 1736 Handle<JSFunction>::cast(setter)); | 1737 lookup->GetAccessorIndex(), |
| 1738 expected_arguments); |
| 1737 } | 1739 } |
| 1738 break; | 1740 break; |
| 1739 } | 1741 } |
| 1740 | 1742 |
| 1741 case LookupIterator::DATA: { | 1743 case LookupIterator::DATA: { |
| 1742 if (lookup->is_dictionary_holder()) { | 1744 if (lookup->is_dictionary_holder()) { |
| 1743 if (holder->IsGlobalObject()) { | 1745 if (holder->IsGlobalObject()) { |
| 1744 Handle<PropertyCell> cell = lookup->GetPropertyCell(); | 1746 Handle<PropertyCell> cell = lookup->GetPropertyCell(); |
| 1745 Handle<HeapType> union_type = PropertyCell::UpdatedType(cell, value); | 1747 Handle<HeapType> union_type = PropertyCell::UpdatedType(cell, value); |
| 1746 StoreGlobalStub stub(isolate(), union_type->IsConstant(), | 1748 StoreGlobalStub stub(isolate(), union_type->IsConstant(), |
| (...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2979 static const Address IC_utilities[] = { | 2981 static const Address IC_utilities[] = { |
| 2980 #define ADDR(name) FUNCTION_ADDR(name), | 2982 #define ADDR(name) FUNCTION_ADDR(name), |
| 2981 IC_UTIL_LIST(ADDR) NULL | 2983 IC_UTIL_LIST(ADDR) NULL |
| 2982 #undef ADDR | 2984 #undef ADDR |
| 2983 }; | 2985 }; |
| 2984 | 2986 |
| 2985 | 2987 |
| 2986 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 2988 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
| 2987 } | 2989 } |
| 2988 } // namespace v8::internal | 2990 } // namespace v8::internal |
| OLD | NEW |