| OLD | NEW |
| 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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 } | 819 } |
| 820 } | 820 } |
| 821 | 821 |
| 822 | 822 |
| 823 void Deoptimizer::MaterializeHeapObjects(JavaScriptFrameIterator* it) { | 823 void Deoptimizer::MaterializeHeapObjects(JavaScriptFrameIterator* it) { |
| 824 ASSERT_NE(DEBUGGER, bailout_type_); | 824 ASSERT_NE(DEBUGGER, bailout_type_); |
| 825 | 825 |
| 826 // Handlify all argument object values before triggering any allocation. | 826 // Handlify all argument object values before triggering any allocation. |
| 827 List<Handle<Object> > values(deferred_arguments_objects_values_.length()); | 827 List<Handle<Object> > values(deferred_arguments_objects_values_.length()); |
| 828 for (int i = 0; i < deferred_arguments_objects_values_.length(); ++i) { | 828 for (int i = 0; i < deferred_arguments_objects_values_.length(); ++i) { |
| 829 values.Add(Handle<Object>(deferred_arguments_objects_values_[i])); | 829 values.Add(Handle<Object>(deferred_arguments_objects_values_[i], |
| 830 isolate_)); |
| 830 } | 831 } |
| 831 | 832 |
| 832 // Play it safe and clear all unhandlified values before we continue. | 833 // Play it safe and clear all unhandlified values before we continue. |
| 833 deferred_arguments_objects_values_.Clear(); | 834 deferred_arguments_objects_values_.Clear(); |
| 834 | 835 |
| 835 // Materialize all heap numbers before looking at arguments because when the | 836 // Materialize all heap numbers before looking at arguments because when the |
| 836 // output frames are used to materialize arguments objects later on they need | 837 // output frames are used to materialize arguments objects later on they need |
| 837 // to already contain valid heap numbers. | 838 // to already contain valid heap numbers. |
| 838 for (int i = 0; i < deferred_heap_numbers_.length(); i++) { | 839 for (int i = 0; i < deferred_heap_numbers_.length(); i++) { |
| 839 HeapNumberMaterializationDescriptor d = deferred_heap_numbers_[i]; | 840 HeapNumberMaterializationDescriptor d = deferred_heap_numbers_[i]; |
| (...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1999 } | 2000 } |
| 2000 | 2001 |
| 2001 case Translation::DOUBLE_STACK_SLOT: { | 2002 case Translation::DOUBLE_STACK_SLOT: { |
| 2002 int slot_index = iterator->Next(); | 2003 int slot_index = iterator->Next(); |
| 2003 Address slot_addr = SlotAddress(frame, slot_index); | 2004 Address slot_addr = SlotAddress(frame, slot_index); |
| 2004 return SlotRef(slot_addr, SlotRef::DOUBLE); | 2005 return SlotRef(slot_addr, SlotRef::DOUBLE); |
| 2005 } | 2006 } |
| 2006 | 2007 |
| 2007 case Translation::LITERAL: { | 2008 case Translation::LITERAL: { |
| 2008 int literal_index = iterator->Next(); | 2009 int literal_index = iterator->Next(); |
| 2009 return SlotRef(data->LiteralArray()->get(literal_index)); | 2010 return SlotRef(data->GetIsolate(), |
| 2011 data->LiteralArray()->get(literal_index)); |
| 2010 } | 2012 } |
| 2011 | 2013 |
| 2012 case Translation::COMPILED_STUB_FRAME: | 2014 case Translation::COMPILED_STUB_FRAME: |
| 2013 UNREACHABLE(); | 2015 UNREACHABLE(); |
| 2014 break; | 2016 break; |
| 2015 } | 2017 } |
| 2016 | 2018 |
| 2017 UNREACHABLE(); | 2019 UNREACHABLE(); |
| 2018 return SlotRef(); | 2020 return SlotRef(); |
| 2019 } | 2021 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2135 | 2137 |
| 2136 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 2138 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
| 2137 v->VisitPointer(BitCast<Object**>(&function_)); | 2139 v->VisitPointer(BitCast<Object**>(&function_)); |
| 2138 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 2140 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
| 2139 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 2141 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
| 2140 } | 2142 } |
| 2141 | 2143 |
| 2142 #endif // ENABLE_DEBUGGER_SUPPORT | 2144 #endif // ENABLE_DEBUGGER_SUPPORT |
| 2143 | 2145 |
| 2144 } } // namespace v8::internal | 2146 } } // namespace v8::internal |
| OLD | NEW |