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

Side by Side Diff: runtime/vm/flow_graph_compiler.cc

Issue 10832214: Move deopt reason into PcDescriptor so the EAX/RAX register is not destroyed. Some cleanups in PC d… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_ia32.h » ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 frame_register_allocator()->IsSpilled()); 222 frame_register_allocator()->IsSpilled());
223 pc_descriptors_list()->AddDescriptor(kind, 223 pc_descriptors_list()->AddDescriptor(kind,
224 assembler()->CodeSize(), 224 assembler()->CodeSize(),
225 deopt_id, 225 deopt_id,
226 token_pos, 226 token_pos,
227 try_index); 227 try_index);
228 } 228 }
229 229
230 230
231 Label* FlowGraphCompiler::AddDeoptStub(intptr_t deopt_id, 231 Label* FlowGraphCompiler::AddDeoptStub(intptr_t deopt_id,
232 intptr_t deopt_token_pos,
233 intptr_t try_index, 232 intptr_t try_index,
234 DeoptReasonId reason, 233 DeoptReasonId reason,
235 Register reg1, 234 Register reg1,
236 Register reg2, 235 Register reg2,
237 Register reg3) { 236 Register reg3) {
238 DeoptimizationStub* stub = 237 DeoptimizationStub* stub =
239 new DeoptimizationStub(deopt_id, deopt_token_pos, try_index, reason); 238 new DeoptimizationStub(deopt_id, try_index, reason);
240 if (pending_deoptimization_env_ == NULL) { 239 if (pending_deoptimization_env_ == NULL) {
241 ASSERT(!is_ssa_); 240 ASSERT(!is_ssa_);
242 frame_register_allocator()->SpillInDeoptStub(stub); 241 frame_register_allocator()->SpillInDeoptStub(stub);
243 if (reg1 != kNoRegister) stub->Push(reg1); 242 if (reg1 != kNoRegister) stub->Push(reg1);
244 if (reg2 != kNoRegister) stub->Push(reg2); 243 if (reg2 != kNoRegister) stub->Push(reg2);
245 if (reg3 != kNoRegister) stub->Push(reg3); 244 if (reg3 != kNoRegister) stub->Push(reg3);
246 } else { 245 } else {
247 ASSERT(pending_deoptimization_env_ != NULL); 246 ASSERT(pending_deoptimization_env_ != NULL);
248 stub->set_deoptimization_env(pending_deoptimization_env_); 247 stub->set_deoptimization_env(pending_deoptimization_env_);
249 } 248 }
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 return; 851 return;
853 } 852 }
854 } 853 }
855 854
856 // This move is not blocked. 855 // This move is not blocked.
857 EmitMove(index); 856 EmitMove(index);
858 } 857 }
859 858
860 859
861 } // namespace dart 860 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698