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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 int Deoptimizer::patch_size() { | 44 int Deoptimizer::patch_size() { |
45 return Assembler::kCallInstructionLength; | 45 return Assembler::kCallInstructionLength; |
46 } | 46 } |
47 | 47 |
48 | 48 |
49 void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList( | 49 void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList( |
50 JSFunction* function) { | 50 JSFunction* function) { |
51 Isolate* isolate = function->GetIsolate(); | 51 Isolate* isolate = function->GetIsolate(); |
52 HandleScope scope(isolate); | 52 HandleScope scope(isolate); |
53 AssertNoAllocation no_allocation; | 53 DisallowHeapAllocation nha; |
54 | 54 |
55 ASSERT(function->IsOptimized()); | 55 ASSERT(function->IsOptimized()); |
56 ASSERT(function->FunctionsInFunctionListShareSameCode()); | 56 ASSERT(function->FunctionsInFunctionListShareSameCode()); |
57 | 57 |
58 // Get the optimized code. | 58 // Get the optimized code. |
59 Code* code = function->code(); | 59 Code* code = function->code(); |
60 | 60 |
61 // The optimized code is going to be patched, so we cannot use it any more. | 61 // The optimized code is going to be patched, so we cannot use it any more. |
62 function->shared()->EvictFromOptimizedCodeMap(code, "deoptimized function"); | 62 function->shared()->EvictFromOptimizedCodeMap(code, "deoptimized function"); |
63 | 63 |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 } | 618 } |
619 __ bind(&done); | 619 __ bind(&done); |
620 } | 620 } |
621 | 621 |
622 #undef __ | 622 #undef __ |
623 | 623 |
624 | 624 |
625 } } // namespace v8::internal | 625 } } // namespace v8::internal |
626 | 626 |
627 #endif // V8_TARGET_ARCH_X64 | 627 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |