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

Unified Diff: src/ic/ic.cc

Issue 898973003: Revert "[turbofan] Make Factory::NewNumber() always return the minus_zero_value." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/factory.cc ('k') | test/unittests/factory-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index ccb4f925e6ba8d3adfc9fd2191aeb03290bdfebd..537b18324d6868e29b5a494090f0b4cad59e4e26 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -2508,19 +2508,6 @@ MaybeHandle<Object> BinaryOpIC::Transition(
ASSIGN_RETURN_ON_EXCEPTION(
isolate(), result, Execution::Call(isolate(), function, left, 1, &right),
Object);
- if (result->IsHeapNumber()) {
- // If the result of this BinaryOpIC is used as left or right hand side of
- // another binary operation, full-codegen.cc might have decided that its
- // safe to reuse the double box returned by this BinaryOpIC, but the builtin
- // above does not know or care about this fact and might return a canonical
- // value (i.e. the global minus zero constant), which we would then
- // overwrite in the surrounding binary operation. So to be safe, we need to
- // take a copy of heap numbers here.
- result = isolate()->factory()->NewHeapNumber(result->Number());
- }
- DCHECK(!result.is_identical_to(isolate()->factory()->nan_value()));
- DCHECK(!result.is_identical_to(isolate()->factory()->infinity_value()));
- DCHECK(!result.is_identical_to(isolate()->factory()->minus_zero_value()));
// Execution::Call can execute arbitrary JavaScript, hence potentially
// update the state of this very IC, so we must update the stored state.
« no previous file with comments | « src/factory.cc ('k') | test/unittests/factory-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698