OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 | 656 |
657 | 657 |
658 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 658 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
659 receiver_type_ = oracle->ObjectLiteralStoreIsMonomorphic(this) | 659 receiver_type_ = oracle->ObjectLiteralStoreIsMonomorphic(this) |
660 ? oracle->GetObjectLiteralStoreMap(this) | 660 ? oracle->GetObjectLiteralStoreMap(this) |
661 : Handle<Map>::null(); | 661 : Handle<Map>::null(); |
662 } | 662 } |
663 | 663 |
664 | 664 |
665 void UnaryOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 665 void UnaryOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
666 type_ = oracle->UnaryType(this); | 666 type_ = oracle->UnaryType(UnaryOperationFeedbackId()); |
667 } | 667 } |
668 | 668 |
669 | 669 |
670 void BinaryOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 670 void BinaryOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
671 oracle->BinaryType(this, &left_type_, &right_type_, &result_type_, | 671 oracle->BinaryType(BinaryOperationFeedbackId(), |
| 672 &left_type_, &right_type_, &result_type_, |
672 &has_fixed_right_arg_, &fixed_right_arg_value_); | 673 &has_fixed_right_arg_, &fixed_right_arg_value_); |
673 } | 674 } |
674 | 675 |
675 | 676 |
676 // TODO(rossberg): this function (and all other RecordTypeFeedback functions) | 677 // TODO(rossberg): this function (and all other RecordTypeFeedback functions) |
677 // should disappear once we use the common type field in the AST consistently. | 678 // should disappear once we use the common type field in the AST consistently. |
678 void CompareOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 679 void CompareOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
679 oracle->CompareTypes(CompareOperationFeedbackId(), | 680 oracle->CompareTypes(CompareOperationFeedbackId(), |
680 &left_type_, &right_type_, &overall_type_, &compare_nil_type_); | 681 &left_type_, &right_type_, &overall_type_, &compare_nil_type_); |
681 } | 682 } |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); | 1176 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); |
1176 str = arr; | 1177 str = arr; |
1177 } else { | 1178 } else { |
1178 str = DoubleToCString(handle_->Number(), buffer); | 1179 str = DoubleToCString(handle_->Number(), buffer); |
1179 } | 1180 } |
1180 return factory->NewStringFromAscii(CStrVector(str)); | 1181 return factory->NewStringFromAscii(CStrVector(str)); |
1181 } | 1182 } |
1182 | 1183 |
1183 | 1184 |
1184 } } // namespace v8::internal | 1185 } } // namespace v8::internal |
OLD | NEW |