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

Unified Diff: src/ic.cc

Issue 6366028: X64 Crankshaft: Add TypeRecordingBinaryStub to X64 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/type-info.h » ('j') | src/x64/code-stubs-x64.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
===================================================================
--- src/ic.cc (revision 6575)
+++ src/ic.cc (working copy)
@@ -2053,6 +2053,7 @@
}
if (left_type.IsInteger32() && right_type.IsInteger32()) {
+ ASSERT(kSmiValueSize != 32); // 32-bit Smis cause no distinct INT32 type.
return INT32;
}
@@ -2096,9 +2097,11 @@
}
if (type == TRBinaryOpIC::SMI &&
previous_type == TRBinaryOpIC::SMI) {
- if (op == Token::DIV || op == Token::MUL) {
+ if (op == Token::DIV || op == Token::MUL || kSmiValueSize == 32) {
// Arithmetic on two Smi inputs has yielded a heap number.
// That is the only way to get here from the Smi stub.
+ // With 32-bit Smis, all overflows give heap numbers, but with
+ // 31-bit Smis, most operations overflow to int32 results.
result_type = TRBinaryOpIC::HEAP_NUMBER;
} else {
// Other operations on SMIs that overflow yield int32s.
« no previous file with comments | « no previous file | src/type-info.h » ('j') | src/x64/code-stubs-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698