Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Side by Side Diff: src/ast.cc

Issue 6263001: Expose receiver check type in call type feedback. (Closed)
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ast.h ('k') | src/compiler.cc » ('j') | src/type-info.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 if (FLAG_enable_slow_asserts) { 638 if (FLAG_enable_slow_asserts) {
639 if (receiver_types_ != NULL) { 639 if (receiver_types_ != NULL) {
640 int length = receiver_types_->length(); 640 int length = receiver_types_->length();
641 for (int i = 0; i < length; i++) { 641 for (int i = 0; i < length; i++) {
642 Handle<Map> map = receiver_types_->at(i); 642 Handle<Map> map = receiver_types_->at(i);
643 ASSERT(!map.is_null() && *map != NULL); 643 ASSERT(!map.is_null() && *map != NULL);
644 } 644 }
645 } 645 }
646 } 646 }
647 #endif 647 #endif
648 if (receiver_types_ != NULL && receiver_types_->length() > 0) { 648 is_monomorphic_ = oracle->CallIsMonomorphic(this);
649 Handle<Map> type = receiver_types_->at(0); 649 check_type_ = oracle->GetCallCheckType(this);
650 is_monomorphic_ = oracle->CallIsMonomorphic(this); 650 if (is_monomorphic_) {
651 if (is_monomorphic_) is_monomorphic_ = ComputeTarget(type, name); 651 Handle<Map> map;
652 if (receiver_types_ != NULL && receiver_types_->length() > 0) {
653 ASSERT(check_type_ == RECEIVER_MAP_CHECK);
654 map = receiver_types_->at(0);
655 } else {
656 ASSERT(check_type_ != RECEIVER_MAP_CHECK);
657 map = Handle<Map>(
658 oracle->GetPrototypeForPrimitiveCheck(check_type_)->map());
659 }
660 is_monomorphic_ = ComputeTarget(map, name);
652 } 661 }
653 } 662 }
654 663
655 664
656 void BinaryOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 665 void BinaryOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
657 TypeInfo left = oracle->BinaryType(this, TypeFeedbackOracle::LEFT); 666 TypeInfo left = oracle->BinaryType(this, TypeFeedbackOracle::LEFT);
658 TypeInfo right = oracle->BinaryType(this, TypeFeedbackOracle::RIGHT); 667 TypeInfo right = oracle->BinaryType(this, TypeFeedbackOracle::RIGHT);
659 is_smi_only_ = left.IsSmi() && right.IsSmi(); 668 is_smi_only_ = left.IsSmi() && right.IsSmi();
660 } 669 }
661 670
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 1054
1046 CaseClause::CaseClause(Expression* label, 1055 CaseClause::CaseClause(Expression* label,
1047 ZoneList<Statement*>* statements, 1056 ZoneList<Statement*>* statements,
1048 int pos) 1057 int pos)
1049 : label_(label), 1058 : label_(label),
1050 statements_(statements), 1059 statements_(statements),
1051 position_(pos), 1060 position_(pos),
1052 compare_type_(NONE) {} 1061 compare_type_(NONE) {}
1053 1062
1054 } } // namespace v8::internal 1063 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/compiler.cc » ('j') | src/type-info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698