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

Side by Side Diff: src/deoptimizer.cc

Issue 23940005: Ensure escape analysis preserves boxed HeapNumber. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 materialized_objects_->Add(arguments); 1610 materialized_objects_->Add(arguments);
1611 for (int i = 0; i < length; ++i) { 1611 for (int i = 0; i < length; ++i) {
1612 Handle<Object> value = MaterializeNextValue(); 1612 Handle<Object> value = MaterializeNextValue();
1613 array->set(i, *value); 1613 array->set(i, *value);
1614 } 1614 }
1615 } else { 1615 } else {
1616 // Dispatch on the instance type of the object to be materialized. 1616 // Dispatch on the instance type of the object to be materialized.
1617 Handle<Map> map = Handle<Map>::cast(MaterializeNextValue()); 1617 Handle<Map> map = Handle<Map>::cast(MaterializeNextValue());
1618 switch (map->instance_type()) { 1618 switch (map->instance_type()) {
1619 case HEAP_NUMBER_TYPE: { 1619 case HEAP_NUMBER_TYPE: {
1620 Handle<HeapNumber> number = 1620 Handle<HeapNumber> object = isolate_->factory()->NewHeapNumber(0.0);
1621 Handle<HeapNumber>::cast(MaterializeNextValue()); 1621 materialized_objects_->Add(object);
1622 materialized_objects_->Add(number); 1622 Handle<Object> number = MaterializeNextValue();
1623 object->set_value(number->Number());
1623 materialization_value_index_ += kDoubleSize / kPointerSize - 1; 1624 materialization_value_index_ += kDoubleSize / kPointerSize - 1;
1624 break; 1625 break;
1625 } 1626 }
1626 case JS_OBJECT_TYPE: { 1627 case JS_OBJECT_TYPE: {
1627 Handle<JSObject> object = 1628 Handle<JSObject> object =
1628 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED, false); 1629 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED, false);
1629 materialized_objects_->Add(object); 1630 materialized_objects_->Add(object);
1630 Handle<Object> properties = MaterializeNextValue(); 1631 Handle<Object> properties = MaterializeNextValue();
1631 Handle<Object> elements = MaterializeNextValue(); 1632 Handle<Object> elements = MaterializeNextValue();
1632 object->set_properties(FixedArray::cast(*properties)); 1633 object->set_properties(FixedArray::cast(*properties));
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
3051 3052
3052 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 3053 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
3053 v->VisitPointer(BitCast<Object**>(&function_)); 3054 v->VisitPointer(BitCast<Object**>(&function_));
3054 v->VisitPointers(parameters_, parameters_ + parameters_count_); 3055 v->VisitPointers(parameters_, parameters_ + parameters_count_);
3055 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 3056 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
3056 } 3057 }
3057 3058
3058 #endif // ENABLE_DEBUGGER_SUPPORT 3059 #endif // ENABLE_DEBUGGER_SUPPORT
3059 3060
3060 } } // namespace v8::internal 3061 } } // namespace v8::internal
OLDNEW
« 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