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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 AssertNoAllocation no_allocation; |
54 | 54 |
55 ASSERT(function->IsOptimized()); | 55 ASSERT(function->IsOptimized()); |
56 ASSERT(function->FunctionsInFunctionListShareSameCode()); | 56 ASSERT(function->FunctionsInFunctionListShareSameCode()); |
57 | 57 |
58 // The optimized code is going to be patched, so we cannot use it | 58 // The optimized code is going to be patched, so we cannot use it |
59 // any more. Play safe and reset the whole cache. | 59 // any more. Play safe and reset the whole cache. |
60 function->shared()->ClearOptimizedCodeMap(); | 60 function->shared()->ClearOptimizedCodeMap("deoptimized function"); |
61 | 61 |
62 // Get the optimized code. | 62 // Get the optimized code. |
63 Code* code = function->code(); | 63 Code* code = function->code(); |
64 | 64 |
65 // Invalidate the relocation information, as it will become invalid by the | 65 // Invalidate the relocation information, as it will become invalid by the |
66 // code patching below, and is not needed any more. | 66 // code patching below, and is not needed any more. |
67 code->InvalidateRelocation(); | 67 code->InvalidateRelocation(); |
68 | 68 |
69 // For each LLazyBailout instruction insert a absolute call to the | 69 // For each LLazyBailout instruction insert a absolute call to the |
70 // corresponding deoptimization entry, or a short call to an absolute | 70 // corresponding deoptimization entry, or a short call to an absolute |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 } | 784 } |
785 __ bind(&done); | 785 __ bind(&done); |
786 } | 786 } |
787 | 787 |
788 #undef __ | 788 #undef __ |
789 | 789 |
790 | 790 |
791 } } // namespace v8::internal | 791 } } // namespace v8::internal |
792 | 792 |
793 #endif // V8_TARGET_ARCH_X64 | 793 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |