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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 receiver_types_.Reserve(kMaxKeyedPolymorphism); | 688 receiver_types_.Reserve(kMaxKeyedPolymorphism); |
689 oracle->CollectKeyedReceiverTypes(this->id(), &receiver_types_); | 689 oracle->CollectKeyedReceiverTypes(this->id(), &receiver_types_); |
690 } | 690 } |
691 } | 691 } |
692 | 692 |
693 | 693 |
694 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 694 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
695 TypeInfo info = oracle->SwitchType(this); | 695 TypeInfo info = oracle->SwitchType(this); |
696 if (info.IsSmi()) { | 696 if (info.IsSmi()) { |
697 compare_type_ = SMI_ONLY; | 697 compare_type_ = SMI_ONLY; |
| 698 } else if (info.IsSymbol()) { |
| 699 compare_type_ = SYMBOL_ONLY; |
| 700 } else if (info.IsNonSymbol()) { |
| 701 compare_type_ = STRING_ONLY; |
698 } else if (info.IsNonPrimitive()) { | 702 } else if (info.IsNonPrimitive()) { |
699 compare_type_ = OBJECT_ONLY; | 703 compare_type_ = OBJECT_ONLY; |
700 } else { | 704 } else { |
701 ASSERT(compare_type_ == NONE); | 705 ASSERT(compare_type_ == NONE); |
702 } | 706 } |
703 } | 707 } |
704 | 708 |
705 | 709 |
706 static bool CanCallWithoutIC(Handle<JSFunction> target, int arity) { | 710 static bool CanCallWithoutIC(Handle<JSFunction> target, int arity) { |
707 SharedFunctionInfo* info = target->shared(); | 711 SharedFunctionInfo* info = target->shared(); |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 int pos) | 1195 int pos) |
1192 : label_(label), | 1196 : label_(label), |
1193 statements_(statements), | 1197 statements_(statements), |
1194 position_(pos), | 1198 position_(pos), |
1195 compare_type_(NONE), | 1199 compare_type_(NONE), |
1196 compare_id_(AstNode::GetNextId(isolate)), | 1200 compare_id_(AstNode::GetNextId(isolate)), |
1197 entry_id_(AstNode::GetNextId(isolate)) { | 1201 entry_id_(AstNode::GetNextId(isolate)) { |
1198 } | 1202 } |
1199 | 1203 |
1200 } } // namespace v8::internal | 1204 } } // namespace v8::internal |
OLD | NEW |