| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // Replace relocation information on the code object. | 111 // Replace relocation information on the code object. |
| 112 code->set_relocation_info(*new_reloc); | 112 code->set_relocation_info(*new_reloc); |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 | 115 |
| 116 | 116 |
| 117 void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList( | 117 void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList( |
| 118 JSFunction* function) { | 118 JSFunction* function) { |
| 119 Isolate* isolate = function->GetIsolate(); | 119 Isolate* isolate = function->GetIsolate(); |
| 120 HandleScope scope(isolate); | 120 HandleScope scope(isolate); |
| 121 AssertNoAllocation no_allocation; | 121 DisallowHeapAllocation nha; |
| 122 | 122 |
| 123 ASSERT(function->IsOptimized()); | 123 ASSERT(function->IsOptimized()); |
| 124 ASSERT(function->FunctionsInFunctionListShareSameCode()); | 124 ASSERT(function->FunctionsInFunctionListShareSameCode()); |
| 125 | 125 |
| 126 // Get the optimized code. | 126 // Get the optimized code. |
| 127 Code* code = function->code(); | 127 Code* code = function->code(); |
| 128 Address code_start_address = code->instruction_start(); | 128 Address code_start_address = code->instruction_start(); |
| 129 | 129 |
| 130 // The optimized code is going to be patched, so we cannot use it any more. | 130 // The optimized code is going to be patched, so we cannot use it any more. |
| 131 function->shared()->EvictFromOptimizedCodeMap(code, "deoptimized function"); | 131 function->shared()->EvictFromOptimizedCodeMap(code, "deoptimized function"); |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 } | 748 } |
| 749 __ bind(&done); | 749 __ bind(&done); |
| 750 } | 750 } |
| 751 | 751 |
| 752 #undef __ | 752 #undef __ |
| 753 | 753 |
| 754 | 754 |
| 755 } } // namespace v8::internal | 755 } } // namespace v8::internal |
| 756 | 756 |
| 757 #endif // V8_TARGET_ARCH_IA32 | 757 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |