| 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/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1845 | 1845 |
| 1846 bool CallIC::DoCustomHandler(Handle<Object> receiver, | 1846 bool CallIC::DoCustomHandler(Handle<Object> receiver, |
| 1847 Handle<Object> function, | 1847 Handle<Object> function, |
| 1848 Handle<FixedArray> vector, | 1848 Handle<FixedArray> vector, |
| 1849 Handle<Smi> slot, | 1849 Handle<Smi> slot, |
| 1850 const State& state) { | 1850 const State& state) { |
| 1851 ASSERT(FLAG_use_ic && function->IsJSFunction()); | 1851 ASSERT(FLAG_use_ic && function->IsJSFunction()); |
| 1852 | 1852 |
| 1853 // Are we the array function? | 1853 // Are we the array function? |
| 1854 Handle<JSFunction> array_function = Handle<JSFunction>( | 1854 Handle<JSFunction> array_function = Handle<JSFunction>( |
| 1855 isolate()->context()->native_context()->array_function(), isolate()); | 1855 isolate()->native_context()->array_function()); |
| 1856 if (array_function.is_identical_to(Handle<JSFunction>::cast(function))) { | 1856 if (array_function.is_identical_to(Handle<JSFunction>::cast(function))) { |
| 1857 // Alter the slot. | 1857 // Alter the slot. |
| 1858 Handle<AllocationSite> new_site = isolate()->factory()->NewAllocationSite(); | 1858 Handle<AllocationSite> new_site = isolate()->factory()->NewAllocationSite(); |
| 1859 vector->set(slot->value(), *new_site); | 1859 vector->set(slot->value(), *new_site); |
| 1860 CallIC_ArrayStub stub(isolate(), state); | 1860 CallIC_ArrayStub stub(isolate(), state); |
| 1861 set_target(*stub.GetCode()); | 1861 set_target(*stub.GetCode()); |
| 1862 Handle<String> name; | 1862 Handle<String> name; |
| 1863 if (array_function->shared()->name()->IsString()) { | 1863 if (array_function->shared()->name()->IsString()) { |
| 1864 name = Handle<String>(String::cast(array_function->shared()->name()), | 1864 name = Handle<String>(String::cast(array_function->shared()->name()), |
| 1865 isolate()); | 1865 isolate()); |
| (...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3079 #undef ADDR | 3079 #undef ADDR |
| 3080 }; | 3080 }; |
| 3081 | 3081 |
| 3082 | 3082 |
| 3083 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 3083 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 3084 return IC_utilities[id]; | 3084 return IC_utilities[id]; |
| 3085 } | 3085 } |
| 3086 | 3086 |
| 3087 | 3087 |
| 3088 } } // namespace v8::internal | 3088 } } // namespace v8::internal |
| OLD | NEW |