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

Unified Diff: src/type-info.cc

Issue 15735005: Collect type feedback for power-of-2 right operands in BinaryOps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 7 years, 6 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
« no previous file with comments | « src/type-info.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index 0fa46e75777cf6945d8d617c6e421603d0b8e454..53a43b42215eec158f1fc3ee4aec4b369b370d4f 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -456,7 +456,9 @@ static TypeInfo TypeFromBinaryOpType(BinaryOpIC::TypeInfo binary_type) {
void TypeFeedbackOracle::BinaryType(BinaryOperation* expr,
TypeInfo* left,
TypeInfo* right,
- TypeInfo* result) {
+ TypeInfo* result,
+ bool* has_fixed_right_arg,
+ int* fixed_right_arg_value) {
Handle<Object> object = GetInfo(expr->BinaryOperationFeedbackId());
TypeInfo unknown = TypeInfo::Unknown();
if (!object->IsCode()) {
@@ -465,12 +467,17 @@ void TypeFeedbackOracle::BinaryType(BinaryOperation* expr,
}
Handle<Code> code = Handle<Code>::cast(object);
if (code->is_binary_op_stub()) {
+ int minor_key = code->stub_info();
BinaryOpIC::TypeInfo left_type, right_type, result_type;
- BinaryOpStub::decode_types_from_minor_key(code->stub_info(), &left_type,
- &right_type, &result_type);
+ BinaryOpStub::decode_types_from_minor_key(
+ minor_key, &left_type, &right_type, &result_type);
*left = TypeFromBinaryOpType(left_type);
*right = TypeFromBinaryOpType(right_type);
*result = TypeFromBinaryOpType(result_type);
+ *has_fixed_right_arg =
+ BinaryOpStub::decode_has_fixed_right_arg_from_minor_key(minor_key);
+ *fixed_right_arg_value =
+ BinaryOpStub::decode_fixed_right_arg_value_from_minor_key(minor_key);
return;
}
// Not a binary op stub.
« no previous file with comments | « src/type-info.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698