OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 } | 518 } |
519 | 519 |
520 | 520 |
521 void CallICBase::UpdateCaches(LookupResult* lookup, | 521 void CallICBase::UpdateCaches(LookupResult* lookup, |
522 State state, | 522 State state, |
523 Handle<Object> object, | 523 Handle<Object> object, |
524 Handle<String> name) { | 524 Handle<String> name) { |
525 // Bail out if we didn't find a result. | 525 // Bail out if we didn't find a result. |
526 if (!lookup->IsProperty() || !lookup->IsCacheable()) return; | 526 if (!lookup->IsProperty() || !lookup->IsCacheable()) return; |
527 | 527 |
528 #ifndef V8_TARGET_ARCH_IA32 | |
529 // Normal objects only implemented for IA32 by now. | |
530 if (HasNormalObjectsInPrototypeChain(lookup, *object)) return; | |
531 #else | |
532 if (lookup->holder() != *object && | 528 if (lookup->holder() != *object && |
533 HasNormalObjectsInPrototypeChain(lookup, object->GetPrototype())) { | 529 HasNormalObjectsInPrototypeChain(lookup, object->GetPrototype())) { |
534 // Suppress optimization for prototype chains with slow properties objects | 530 // Suppress optimization for prototype chains with slow properties objects |
535 // in the middle. | 531 // in the middle. |
536 return; | 532 return; |
537 } | 533 } |
538 #endif | |
539 | 534 |
540 // Compute the number of arguments. | 535 // Compute the number of arguments. |
541 int argc = target()->arguments_count(); | 536 int argc = target()->arguments_count(); |
542 InLoopFlag in_loop = target()->ic_in_loop(); | 537 InLoopFlag in_loop = target()->ic_in_loop(); |
543 Object* code = NULL; | 538 Object* code = NULL; |
544 | 539 |
545 if (state == UNINITIALIZED) { | 540 if (state == UNINITIALIZED) { |
546 // This is the first time we execute this inline cache. | 541 // This is the first time we execute this inline cache. |
547 // Set the target to the pre monomorphic stub to delay | 542 // Set the target to the pre monomorphic stub to delay |
548 // setting the monomorphic state. | 543 // setting the monomorphic state. |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1732 #undef ADDR | 1727 #undef ADDR |
1733 }; | 1728 }; |
1734 | 1729 |
1735 | 1730 |
1736 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 1731 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
1737 return IC_utilities[id]; | 1732 return IC_utilities[id]; |
1738 } | 1733 } |
1739 | 1734 |
1740 | 1735 |
1741 } } // namespace v8::internal | 1736 } } // namespace v8::internal |
OLD | NEW |