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

Unified Diff: src/ast/ast.cc

Issue 2209633002: [Interpreter] Assign feedback slots for binary operations and use them in ignition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: src/ast/ast.cc
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index 12e6f206711dba957124c7639a25b4c1c9e89dcd..05117e6117c63ab130c10c0cf19ffbc783948697 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -289,6 +289,9 @@ void CountOperation::AssignFeedbackVectorSlots(Isolate* isolate,
FeedbackVectorSpec* spec,
FeedbackVectorSlotCache* cache) {
AssignVectorSlots(expression(), spec, &slot_);
+ // Assign a slot to collect feedback about binary operations. used only in
rmcilroy 2016/08/03 16:04:29 /s/used/Used
mythria 2016/08/05 07:08:14 Done.
+ // ignition. Fullcodegen uses AstId to record type feedback.
+ binary_operation_slot_ = spec->AddGeneralSlot();
}
@@ -734,6 +737,22 @@ void BinaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
set_to_boolean_types(oracle->ToBooleanTypes(right()->test_id()));
}
+void BinaryOperation::AssignFeedbackVectorSlots(
+ Isolate* isolate, FeedbackVectorSpec* spec,
+ FeedbackVectorSlotCache* cache) {
+ // Feedback vector slot is only used by interpreter for binary operations.
+ // Full-codegen uses AstId to record type feedback.
+ switch (op()) {
+ // Comma, logical_or and logical_and do not collect type feedback.
+ case Token::COMMA:
+ case Token::AND:
+ case Token::OR:
+ return;
+ default:
+ type_feedback_slot_ = spec->AddGeneralSlot();
+ return;
+ }
+}
static bool IsTypeof(Expression* expr) {
UnaryOperation* maybe_unary = expr->AsUnaryOperation();
« no previous file with comments | « src/ast/ast.h ('k') | src/ast/ast-numbering.cc » ('j') | src/interpreter/bytecode-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698