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 <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 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 | 1326 |
1327 // Use specialized code for getting prototype of functions. | 1327 // Use specialized code for getting prototype of functions. |
1328 if (receiver->IsJSFunction() && | 1328 if (receiver->IsJSFunction() && |
1329 Name::Equals(isolate()->factory()->prototype_string(), lookup->name()) && | 1329 Name::Equals(isolate()->factory()->prototype_string(), lookup->name()) && |
1330 receiver->IsConstructor() && | 1330 receiver->IsConstructor() && |
1331 !Handle<JSFunction>::cast(receiver) | 1331 !Handle<JSFunction>::cast(receiver) |
1332 ->map() | 1332 ->map() |
1333 ->has_non_instance_prototype()) { | 1333 ->has_non_instance_prototype()) { |
1334 Handle<Code> stub; | 1334 Handle<Code> stub; |
1335 TRACE_HANDLER_STATS(isolate(), LoadIC_FunctionPrototypeStub); | 1335 TRACE_HANDLER_STATS(isolate(), LoadIC_FunctionPrototypeStub); |
1336 FunctionPrototypeStub function_prototype_stub(isolate()); | 1336 return isolate()->builtins()->LoadIC_FunctionPrototype(); |
1337 return function_prototype_stub.GetCode(); | |
1338 } | 1337 } |
1339 | 1338 |
1340 Handle<Map> map = receiver_map(); | 1339 Handle<Map> map = receiver_map(); |
1341 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); | 1340 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); |
1342 bool receiver_is_holder = receiver.is_identical_to(holder); | 1341 bool receiver_is_holder = receiver.is_identical_to(holder); |
1343 switch (lookup->state()) { | 1342 switch (lookup->state()) { |
1344 case LookupIterator::INTERCEPTOR: | 1343 case LookupIterator::INTERCEPTOR: |
1345 break; // Custom-compiled handler. | 1344 break; // Custom-compiled handler. |
1346 | 1345 |
1347 case LookupIterator::ACCESSOR: { | 1346 case LookupIterator::ACCESSOR: { |
(...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3155 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); | 3154 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); |
3156 it.Next(); | 3155 it.Next(); |
3157 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 3156 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
3158 Object::GetProperty(&it)); | 3157 Object::GetProperty(&it)); |
3159 } | 3158 } |
3160 | 3159 |
3161 return *result; | 3160 return *result; |
3162 } | 3161 } |
3163 } // namespace internal | 3162 } // namespace internal |
3164 } // namespace v8 | 3163 } // namespace v8 |
OLD | NEW |