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

Unified Diff: src/deoptimizer.cc

Issue 57783003: Fix double-boxing issue when materializing captured objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Minor comment change. Created 7 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 84e80b9d9a0c86fa8c859f7bb068fbce68f4d121..96871d610f48d09f367d30d56149d6001aaa3d95 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -1620,10 +1620,10 @@ Handle<Object> Deoptimizer::MaterializeNextHeapObject() {
Handle<Map>::cast(MaterializeNextValue()), Representation::Tagged());
switch (map->instance_type()) {
case HEAP_NUMBER_TYPE: {
- Handle<HeapNumber> object = isolate_->factory()->NewHeapNumber(0.0);
+ // Reuse the HeapNumber value directly as it is already properly
+ // tagged and skip materializing the HeapNumber explicitly.
+ Handle<Object> object = MaterializeNextValue();
materialized_objects_->Add(object);
- Handle<Object> number = MaterializeNextValue();
- object->set_value(number->Number());
materialization_value_index_ += kDoubleSize / kPointerSize - 1;
break;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698