| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 if (!HEAP->InNewSpace(*candidate) && | 705 if (!HEAP->InNewSpace(*candidate) && |
| 706 CanCallWithoutIC(candidate, arguments()->length())) { | 706 CanCallWithoutIC(candidate, arguments()->length())) { |
| 707 target_ = candidate; | 707 target_ = candidate; |
| 708 return true; | 708 return true; |
| 709 } | 709 } |
| 710 } | 710 } |
| 711 return false; | 711 return false; |
| 712 } | 712 } |
| 713 | 713 |
| 714 | 714 |
| 715 void Call::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 715 void Call::RecordTypeFeedback(TypeFeedbackOracle* oracle, |
| 716 ReceiverType receiver_type) { |
| 716 Property* property = expression()->AsProperty(); | 717 Property* property = expression()->AsProperty(); |
| 717 ASSERT(property != NULL); | 718 ASSERT(property != NULL); |
| 718 // Specialize for the receiver types seen at runtime. | 719 // Specialize for the receiver types seen at runtime. |
| 719 Literal* key = property->key()->AsLiteral(); | 720 Literal* key = property->key()->AsLiteral(); |
| 720 ASSERT(key != NULL && key->handle()->IsString()); | 721 ASSERT(key != NULL && key->handle()->IsString()); |
| 721 Handle<String> name = Handle<String>::cast(key->handle()); | 722 Handle<String> name = Handle<String>::cast(key->handle()); |
| 722 receiver_types_ = oracle->CallReceiverTypes(this, name); | 723 receiver_types_ = oracle->CallReceiverTypes(this, name, receiver_type); |
| 723 #ifdef DEBUG | 724 #ifdef DEBUG |
| 724 if (FLAG_enable_slow_asserts) { | 725 if (FLAG_enable_slow_asserts) { |
| 725 if (receiver_types_ != NULL) { | 726 if (receiver_types_ != NULL) { |
| 726 int length = receiver_types_->length(); | 727 int length = receiver_types_->length(); |
| 727 for (int i = 0; i < length; i++) { | 728 for (int i = 0; i < length; i++) { |
| 728 Handle<Map> map = receiver_types_->at(i); | 729 Handle<Map> map = receiver_types_->at(i); |
| 729 ASSERT(!map.is_null() && *map != NULL); | 730 ASSERT(!map.is_null() && *map != NULL); |
| 730 } | 731 } |
| 731 } | 732 } |
| 732 } | 733 } |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 int pos) | 1137 int pos) |
| 1137 : label_(label), | 1138 : label_(label), |
| 1138 statements_(statements), | 1139 statements_(statements), |
| 1139 position_(pos), | 1140 position_(pos), |
| 1140 compare_type_(NONE), | 1141 compare_type_(NONE), |
| 1141 compare_id_(AstNode::GetNextId()), | 1142 compare_id_(AstNode::GetNextId()), |
| 1142 entry_id_(AstNode::GetNextId()) { | 1143 entry_id_(AstNode::GetNextId()) { |
| 1143 } | 1144 } |
| 1144 | 1145 |
| 1145 } } // namespace v8::internal | 1146 } } // namespace v8::internal |
| OLD | NEW |