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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1998 } | 1999 } |
1999 | 2000 |
2000 case Translation::DOUBLE_STACK_SLOT: { | 2001 case Translation::DOUBLE_STACK_SLOT: { |
2001 int slot_index = iterator->Next(); | 2002 int slot_index = iterator->Next(); |
2002 Address slot_addr = SlotAddress(frame, slot_index); | 2003 Address slot_addr = SlotAddress(frame, slot_index); |
2003 return SlotRef(slot_addr, SlotRef::DOUBLE); | 2004 return SlotRef(slot_addr, SlotRef::DOUBLE); |
2004 } | 2005 } |
2005 | 2006 |
2006 case Translation::LITERAL: { | 2007 case Translation::LITERAL: { |
2007 int literal_index = iterator->Next(); | 2008 int literal_index = iterator->Next(); |
2008 return SlotRef(data->LiteralArray()->get(literal_index)); | 2009 return SlotRef(data->GetIsolate(), |
| 2010 data->LiteralArray()->get(literal_index)); |
2009 } | 2011 } |
2010 | 2012 |
2011 case Translation::COMPILED_STUB_FRAME: | 2013 case Translation::COMPILED_STUB_FRAME: |
2012 UNREACHABLE(); | 2014 UNREACHABLE(); |
2013 break; | 2015 break; |
2014 } | 2016 } |
2015 | 2017 |
2016 UNREACHABLE(); | 2018 UNREACHABLE(); |
2017 return SlotRef(); | 2019 return SlotRef(); |
2018 } | 2020 } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2134 | 2136 |
2135 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 2137 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
2136 v->VisitPointer(BitCast<Object**>(&function_)); | 2138 v->VisitPointer(BitCast<Object**>(&function_)); |
2137 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 2139 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
2138 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 2140 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
2139 } | 2141 } |
2140 | 2142 |
2141 #endif // ENABLE_DEBUGGER_SUPPORT | 2143 #endif // ENABLE_DEBUGGER_SUPPORT |
2142 | 2144 |
2143 } } // namespace v8::internal | 2145 } } // namespace v8::internal |
OLD | NEW |