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

Side by Side Diff: src/ic.cc

Issue 7039013: Add code to ia32 TypeRecordingBinaryOpStub to handle SHR Smi overflow. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« src/ia32/code-stubs-ia32.cc ('K') | « src/ia32/code-stubs-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 static_cast<TRBinaryOpIC::TypeInfo>(Smi::cast(args[4])->value()); 2024 static_cast<TRBinaryOpIC::TypeInfo>(Smi::cast(args[4])->value());
2025 2025
2026 TRBinaryOpIC::TypeInfo type = TRBinaryOpIC::GetTypeInfo(left, right); 2026 TRBinaryOpIC::TypeInfo type = TRBinaryOpIC::GetTypeInfo(left, right);
2027 type = TRBinaryOpIC::JoinTypes(type, previous_type); 2027 type = TRBinaryOpIC::JoinTypes(type, previous_type);
2028 TRBinaryOpIC::TypeInfo result_type = TRBinaryOpIC::UNINITIALIZED; 2028 TRBinaryOpIC::TypeInfo result_type = TRBinaryOpIC::UNINITIALIZED;
2029 if ((type == TRBinaryOpIC::STRING || type == TRBinaryOpIC::BOTH_STRING) && 2029 if ((type == TRBinaryOpIC::STRING || type == TRBinaryOpIC::BOTH_STRING) &&
2030 op != Token::ADD) { 2030 op != Token::ADD) {
2031 type = TRBinaryOpIC::GENERIC; 2031 type = TRBinaryOpIC::GENERIC;
2032 } 2032 }
2033 if (type == TRBinaryOpIC::SMI && previous_type == TRBinaryOpIC::SMI) { 2033 if (type == TRBinaryOpIC::SMI && previous_type == TRBinaryOpIC::SMI) {
2034 if (op == Token::DIV || op == Token::MUL || kSmiValueSize == 32) { 2034 if (op == Token::DIV ||
2035 op == Token::MUL ||
2036 op == Token::SHR ||
2037 kSmiValueSize == 32) {
2035 // Arithmetic on two Smi inputs has yielded a heap number. 2038 // Arithmetic on two Smi inputs has yielded a heap number.
2036 // That is the only way to get here from the Smi stub. 2039 // That is the only way to get here from the Smi stub.
2037 // With 32-bit Smis, all overflows give heap numbers, but with 2040 // With 32-bit Smis, all overflows give heap numbers, but with
2038 // 31-bit Smis, most operations overflow to int32 results. 2041 // 31-bit Smis, most operations overflow to int32 results.
2039 result_type = TRBinaryOpIC::HEAP_NUMBER; 2042 result_type = TRBinaryOpIC::HEAP_NUMBER;
2040 } else { 2043 } else {
2041 // Other operations on SMIs that overflow yield int32s. 2044 // Other operations on SMIs that overflow yield int32s.
2042 result_type = TRBinaryOpIC::INT32; 2045 result_type = TRBinaryOpIC::INT32;
2043 } 2046 }
2044 } 2047 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2190 #undef ADDR 2193 #undef ADDR
2191 }; 2194 };
2192 2195
2193 2196
2194 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2197 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2195 return IC_utilities[id]; 2198 return IC_utilities[id];
2196 } 2199 }
2197 2200
2198 2201
2199 } } // namespace v8::internal 2202 } } // namespace v8::internal
OLDNEW
« src/ia32/code-stubs-ia32.cc ('K') | « src/ia32/code-stubs-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698