Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/x87/deoptimizer-x87.cc

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x87/code-stubs-x87.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 Address reloc_end_address = reloc_info->address() + reloc_info->Size(); 121 Address reloc_end_address = reloc_info->address() + reloc_info->Size();
122 RelocInfoWriter reloc_info_writer(reloc_end_address, code_start_address); 122 RelocInfoWriter reloc_info_writer(reloc_end_address, code_start_address);
123 123
124 // Since the call is a relative encoding, write new 124 // Since the call is a relative encoding, write new
125 // reloc info. We do not need any of the existing reloc info because the 125 // reloc info. We do not need any of the existing reloc info because the
126 // existing code will not be used again (we zap it in debug builds). 126 // existing code will not be used again (we zap it in debug builds).
127 // 127 //
128 // Emit call to lazy deoptimization at all lazy deopt points. 128 // Emit call to lazy deoptimization at all lazy deopt points.
129 DeoptimizationInputData* deopt_data = 129 DeoptimizationInputData* deopt_data =
130 DeoptimizationInputData::cast(code->deoptimization_data()); 130 DeoptimizationInputData::cast(code->deoptimization_data());
131 SharedFunctionInfo* shared =
132 SharedFunctionInfo::cast(deopt_data->SharedFunctionInfo());
133 shared->EvictFromOptimizedCodeMap(code, "deoptimized code");
134 #ifdef DEBUG 131 #ifdef DEBUG
135 Address prev_call_address = NULL; 132 Address prev_call_address = NULL;
136 #endif 133 #endif
137 // For each LLazyBailout instruction insert a call to the corresponding 134 // For each LLazyBailout instruction insert a call to the corresponding
138 // deoptimization entry. 135 // deoptimization entry.
139 for (int i = 0; i < deopt_data->DeoptCount(); i++) { 136 for (int i = 0; i < deopt_data->DeoptCount(); i++) {
140 if (deopt_data->Pc(i)->value() == -1) continue; 137 if (deopt_data->Pc(i)->value() == -1) continue;
141 // Patch lazy deoptimization entry. 138 // Patch lazy deoptimization entry.
142 Address call_address = code_start_address + deopt_data->Pc(i)->value(); 139 Address call_address = code_start_address + deopt_data->Pc(i)->value();
143 CodePatcher patcher(call_address, patch_size()); 140 CodePatcher patcher(call_address, patch_size());
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 UNREACHABLE(); 394 UNREACHABLE();
398 } 395 }
399 396
400 397
401 #undef __ 398 #undef __
402 399
403 400
404 } } // namespace v8::internal 401 } } // namespace v8::internal
405 402
406 #endif // V8_TARGET_ARCH_X87 403 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/code-stubs-x87.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698