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

Unified Diff: src/code-stubs.cc

Issue 2407923002: Revert of [Interpreter] Collect feedback about Oddballs in Subtract Stub. (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 | « no previous file | src/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 60ecedacd03d584d92da3bf7c1145d1bb312c3b7..ee8dd6160552844cd2304e48302591802c9cc453 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -828,9 +828,8 @@
typedef CodeStubAssembler::Variable Variable;
// Shared entry for floating point subtraction.
- Label do_fsub(assembler), end(assembler), call_subtract_stub(assembler),
- if_lhsisnotnumber(assembler), check_rhsisoddball(assembler),
- call_with_any_feedback(assembler);
+ Label do_fsub(assembler), end(assembler),
+ call_subtract_stub(assembler, Label::kDeferred);
Variable var_fsub_lhs(assembler, MachineRepresentation::kFloat64),
var_fsub_rhs(assembler, MachineRepresentation::kFloat64),
var_type_feedback(assembler, MachineRepresentation::kWord32),
@@ -880,7 +879,7 @@
// Check if {rhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(rhs_map),
- &check_rhsisoddball);
+ &call_subtract_stub);
// Perform a floating point subtraction.
var_fsub_lhs.Bind(assembler->SmiToFloat64(lhs));
@@ -896,7 +895,7 @@
// Check if the {lhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(lhs_map),
- &if_lhsisnotnumber);
+ &call_subtract_stub);
// Check if the {rhs} is a Smi.
Label if_rhsissmi(assembler), if_rhsisnotsmi(assembler);
@@ -917,7 +916,7 @@
// Check if the {rhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(rhs_map),
- &check_rhsisoddball);
+ &call_subtract_stub);
// Perform a floating point subtraction.
var_fsub_lhs.Bind(assembler->LoadHeapNumberValue(lhs));
@@ -937,63 +936,10 @@
assembler->Goto(&end);
}
- assembler->Bind(&if_lhsisnotnumber);
- {
- // No checks on rhs are done yet. We just know lhs is not a number or Smi.
- // Check if lhs is an oddball.
- Node* lhs_instance_type = assembler->LoadInstanceType(lhs);
- Node* lhs_is_oddball = assembler->Word32Equal(
- lhs_instance_type, assembler->Int32Constant(ODDBALL_TYPE));
- assembler->GotoUnless(lhs_is_oddball, &call_with_any_feedback);
-
- Label if_rhsissmi(assembler), if_rhsisnotsmi(assembler);
- assembler->Branch(assembler->WordIsSmi(rhs), &if_rhsissmi, &if_rhsisnotsmi);
-
- assembler->Bind(&if_rhsissmi);
- {
- var_type_feedback.Bind(
- assembler->Int32Constant(BinaryOperationFeedback::kNumberOrOddball));
- assembler->Goto(&call_subtract_stub);
- }
-
- assembler->Bind(&if_rhsisnotsmi);
- {
- // Load the map of the {rhs}.
- Node* rhs_map = assembler->LoadMap(rhs);
-
- // Check if {rhs} is a HeapNumber.
- assembler->GotoUnless(assembler->IsHeapNumberMap(rhs_map),
- &check_rhsisoddball);
-
- var_type_feedback.Bind(
- assembler->Int32Constant(BinaryOperationFeedback::kNumberOrOddball));
- assembler->Goto(&call_subtract_stub);
- }
- }
-
- assembler->Bind(&check_rhsisoddball);
- {
- // Check if rhs is an oddball. At this point we know lhs is either a
- // Smi or number or oddball and rhs is not a number or Smi.
- Node* rhs_instance_type = assembler->LoadInstanceType(rhs);
- Node* rhs_is_oddball = assembler->Word32Equal(
- rhs_instance_type, assembler->Int32Constant(ODDBALL_TYPE));
- assembler->GotoUnless(rhs_is_oddball, &call_with_any_feedback);
-
- var_type_feedback.Bind(
- assembler->Int32Constant(BinaryOperationFeedback::kNumberOrOddball));
- assembler->Goto(&call_subtract_stub);
- }
-
- assembler->Bind(&call_with_any_feedback);
+ assembler->Bind(&call_subtract_stub);
{
var_type_feedback.Bind(
assembler->Int32Constant(BinaryOperationFeedback::kAny));
- assembler->Goto(&call_subtract_stub);
- }
-
- assembler->Bind(&call_subtract_stub);
- {
Callable callable = CodeFactory::Subtract(assembler->isolate());
var_result.Bind(assembler->CallStub(callable, context, lhs, rhs));
assembler->Goto(&end);
« no previous file with comments | « no previous file | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698