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

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

Issue 6334083: Streamline the code for patching optimized code for lazy deopt. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
Patch Set: Rewrite the incorrect comment mentioning absolute calls. Created 9 years, 10 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/safepoint-table.cc ('k') | src/x64/lithium-codegen-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 last_pc_offset += gap_code_size; 81 last_pc_offset += gap_code_size;
82 CodePatcher patcher(code->instruction_start() + last_pc_offset, 82 CodePatcher patcher(code->instruction_start() + last_pc_offset,
83 patch_size()); 83 patch_size());
84 patcher.masm()->Call(GetDeoptimizationEntry(deoptimization_index, LAZY), 84 patcher.masm()->Call(GetDeoptimizationEntry(deoptimization_index, LAZY),
85 RelocInfo::NONE); 85 RelocInfo::NONE);
86 last_pc_offset += patch_size(); 86 last_pc_offset += patch_size();
87 } 87 }
88 } 88 }
89 #ifdef DEBUG 89 #ifdef DEBUG
90 // Destroy the code which is not supposed to run again. 90 // Destroy the code which is not supposed to run again.
91 CHECK(code->safepoint_table_start() >= last_pc_offset); 91 CHECK(code->safepoint_table_offset() >= last_pc_offset);
92 unsigned instructions = code->safepoint_table_start() - last_pc_offset; 92 unsigned instructions = code->safepoint_table_offset() - last_pc_offset;
93 CodePatcher destroyer(code->instruction_start() + last_pc_offset, 93 CodePatcher destroyer(code->instruction_start() + last_pc_offset,
94 instructions); 94 instructions);
95 for (unsigned i = 0; i < instructions; i++) { 95 for (unsigned i = 0; i < instructions; i++) {
96 destroyer.masm()->int3(); 96 destroyer.masm()->int3();
97 } 97 }
98 #endif 98 #endif
99 99
100 // Add the deoptimizing code to the list. 100 // Add the deoptimizing code to the list.
101 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); 101 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code);
102 node->set_next(deoptimizing_code_list_); 102 node->set_next(deoptimizing_code_list_);
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 } 506 }
507 __ bind(&done); 507 __ bind(&done);
508 } 508 }
509 509
510 #undef __ 510 #undef __
511 511
512 512
513 } } // namespace v8::internal 513 } } // namespace v8::internal
514 514
515 #endif // V8_TARGET_ARCH_X64 515 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/safepoint-table.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698