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

Unified Diff: src/interpreter/interpreter.cc

Issue 2415133002: [stubs] Gets rid of the Smi(Add/Sub)WithOverflow macros. (Closed)
Patch Set: Created 4 years, 2 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/code-stubs.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index f04145eaca4e5ff2bd34bbb34a090e043c657493..6da7e5f066f9477b6da1abc146c50e6e32f74a8a 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1226,7 +1226,8 @@ void Interpreter::DoAddSmi(InterpreterAssembler* assembler) {
__ Bind(&fastpath);
{
// Try fast Smi addition first.
- Node* pair = __ SmiAddWithOverflow(left, right);
+ Node* pair = __ IntPtrAddWithOverflow(__ BitcastTaggedToWord(left),
+ __ BitcastTaggedToWord(right));
Node* overflow = __ Projection(1, pair);
// Check if the Smi additon overflowed.
@@ -1236,7 +1237,7 @@ void Interpreter::DoAddSmi(InterpreterAssembler* assembler) {
{
__ UpdateFeedback(__ Int32Constant(BinaryOperationFeedback::kSignedSmall),
type_feedback_vector, slot_index);
- var_result.Bind(__ Projection(0, pair));
+ var_result.Bind(__ BitcastWordToTaggedSigned(__ Projection(0, pair)));
__ Goto(&end);
}
}
@@ -1279,7 +1280,8 @@ void Interpreter::DoSubSmi(InterpreterAssembler* assembler) {
__ Bind(&fastpath);
{
// Try fast Smi subtraction first.
- Node* pair = __ SmiSubWithOverflow(left, right);
+ Node* pair = __ IntPtrSubWithOverflow(__ BitcastTaggedToWord(left),
+ __ BitcastTaggedToWord(right));
Node* overflow = __ Projection(1, pair);
// Check if the Smi subtraction overflowed.
@@ -1289,7 +1291,7 @@ void Interpreter::DoSubSmi(InterpreterAssembler* assembler) {
{
__ UpdateFeedback(__ Int32Constant(BinaryOperationFeedback::kSignedSmall),
type_feedback_vector, slot_index);
- var_result.Bind(__ Projection(0, pair));
+ var_result.Bind(__ BitcastWordToTaggedSigned(__ Projection(0, pair)));
__ Goto(&end);
}
}
« no previous file with comments | « src/code-stubs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698