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

Unified Diff: src/ic.cc

Issue 142813003: A64: Synchronize with r15358. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index d6e35a7c47ccd16f2a8027ee7e762103db6d8a00..39955610b510eb15ac0a33a0bf64c316690ebec4 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -2437,7 +2437,7 @@ Handle<Type> UnaryOpIC::TypeInfoToType(TypeInfo type_info, Isolate* isolate) {
case UNINITIALIZED:
return handle(Type::None(), isolate);
case SMI:
- return handle(Type::Integer31(), isolate);
+ return handle(Type::Smi(), isolate);
case NUMBER:
return handle(Type::Number(), isolate);
case GENERIC:
@@ -2524,9 +2524,9 @@ Handle<Type> BinaryOpIC::TypeInfoToType(BinaryOpIC::TypeInfo binary_type,
case UNINITIALIZED:
return handle(Type::None(), isolate);
case SMI:
- return handle(Type::Integer31(), isolate);
+ return handle(Type::Smi(), isolate);
case INT32:
- return handle(Type::Integer32(), isolate);
+ return handle(Type::Signed32(), isolate);
case NUMBER:
return handle(Type::Number(), isolate);
case ODDBALL:
@@ -2653,11 +2653,10 @@ static BinaryOpIC::TypeInfo InputState(BinaryOpIC::TypeInfo old_type,
#ifdef DEBUG
static void TraceBinaryOp(BinaryOpIC::TypeInfo left,
BinaryOpIC::TypeInfo right,
- bool has_fixed_right_arg,
- int32_t fixed_right_arg_value,
+ Maybe<int32_t> fixed_right_arg,
BinaryOpIC::TypeInfo result) {
PrintF("%s*%s", BinaryOpIC::GetName(left), BinaryOpIC::GetName(right));
- if (has_fixed_right_arg) PrintF("{%d}", fixed_right_arg_value);
+ if (fixed_right_arg.has_value) PrintF("{%d}", fixed_right_arg.value);
PrintF("->%s", BinaryOpIC::GetName(result));
}
#endif
@@ -2689,10 +2688,8 @@ RUNTIME_FUNCTION(MaybeObject*, BinaryOp_Patch) {
BinaryOpIC::TypeInfo new_overall = Max(new_left, new_right);
BinaryOpIC::TypeInfo previous_overall = Max(previous_left, previous_right);
- bool previous_has_fixed_right_arg =
- BinaryOpStub::decode_has_fixed_right_arg_from_minor_key(key);
- int previous_fixed_right_arg_value =
- BinaryOpStub::decode_fixed_right_arg_value_from_minor_key(key);
+ Maybe<int> previous_fixed_right_arg =
+ BinaryOpStub::decode_fixed_right_arg_from_minor_key(key);
int32_t value;
bool new_has_fixed_right_arg =
@@ -2700,11 +2697,12 @@ RUNTIME_FUNCTION(MaybeObject*, BinaryOp_Patch) {
right->ToInt32(&value) &&
BinaryOpStub::can_encode_arg_value(value) &&
(previous_overall == BinaryOpIC::UNINITIALIZED ||
- (previous_has_fixed_right_arg &&
- previous_fixed_right_arg_value == value));
- int32_t new_fixed_right_arg_value = new_has_fixed_right_arg ? value : 1;
+ (previous_fixed_right_arg.has_value &&
+ previous_fixed_right_arg.value == value));
+ Maybe<int32_t> new_fixed_right_arg(
+ new_has_fixed_right_arg, new_has_fixed_right_arg ? value : 1);
- if (previous_has_fixed_right_arg == new_has_fixed_right_arg) {
+ if (previous_fixed_right_arg.has_value == new_fixed_right_arg.has_value) {
if (new_overall == BinaryOpIC::SMI && previous_overall == BinaryOpIC::SMI) {
if (op == Token::DIV ||
op == Token::MUL ||
@@ -2728,8 +2726,7 @@ RUNTIME_FUNCTION(MaybeObject*, BinaryOp_Patch) {
}
}
- BinaryOpStub stub(key, new_left, new_right, result_type,
- new_has_fixed_right_arg, new_fixed_right_arg_value);
+ BinaryOpStub stub(key, new_left, new_right, result_type, new_fixed_right_arg);
Handle<Code> code = stub.GetCode(isolate);
if (!code.is_null()) {
#ifdef DEBUG
@@ -2737,11 +2734,10 @@ RUNTIME_FUNCTION(MaybeObject*, BinaryOp_Patch) {
PrintF("[BinaryOpIC in ");
JavaScriptFrame::PrintTop(isolate, stdout, false, true);
PrintF(" ");
- TraceBinaryOp(previous_left, previous_right, previous_has_fixed_right_arg,
- previous_fixed_right_arg_value, previous_result);
+ TraceBinaryOp(previous_left, previous_right, previous_fixed_right_arg,
+ previous_result);
PrintF(" => ");
- TraceBinaryOp(new_left, new_right, new_has_fixed_right_arg,
- new_fixed_right_arg_value, result_type);
+ TraceBinaryOp(new_left, new_right, new_fixed_right_arg, result_type);
PrintF(" #%s @ %p]\n", Token::Name(op), static_cast<void*>(*code));
}
#endif
@@ -2849,7 +2845,7 @@ Handle<Type> CompareIC::StateToType(
case CompareIC::UNINITIALIZED:
return handle(Type::None(), isolate);
case CompareIC::SMI:
- return handle(Type::Integer31(), isolate);
+ return handle(Type::Smi(), isolate);
case CompareIC::NUMBER:
return handle(Type::Number(), isolate);
case CompareIC::STRING:
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698