Revision: 17468
Author:   [email protected]
Date:     Tue Nov  5 09:32:39 2013 UTC
Log:      Fix double-boxing issue when materializing captured objects.

[email protected]
TEST=mjsunit/compiler/escape-analysis-representation

Review URL: https://codereview.chromium.org/57783003
http://code.google.com/p/v8/source/detail?r=17468

Modified:
 /branches/bleeding_edge/src/deoptimizer.cc

=======================================
--- /branches/bleeding_edge/src/deoptimizer.cc  Tue Oct 22 13:48:54 2013 UTC
+++ /branches/bleeding_edge/src/deoptimizer.cc  Tue Nov  5 09:32:39 2013 UTC
@@ -1620,10 +1620,10 @@
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;
       }

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to