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

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

Issue 10831070: Allow deoptimization from states with spilled values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Srdjan's comments 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_allocator.cc ('k') | runtime/vm/flow_graph_compiler_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 (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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const intptr_t local_slot_count = values.length() - fixed_parameter_count; 47 const intptr_t local_slot_count = values.length() - fixed_parameter_count;
48 const intptr_t top_offset = 48 const intptr_t top_offset =
49 ParsedFunction::kFirstLocalSlotIndex - (local_slot_count - 1); 49 ParsedFunction::kFirstLocalSlotIndex - (local_slot_count - 1);
50 __ leal(ESP, Address(EBP, top_offset * kWordSize)); 50 __ leal(ESP, Address(EBP, top_offset * kWordSize));
51 51
52 // 2. Build and emit a parallel move representing the frame translation. 52 // 2. Build and emit a parallel move representing the frame translation.
53 ParallelMoveInstr* move = new ParallelMoveInstr(); 53 ParallelMoveInstr* move = new ParallelMoveInstr();
54 for (intptr_t i = 0; i < values.length(); i++) { 54 for (intptr_t i = 0; i < values.length(); i++) {
55 Location destination = Location::StackSlot(i - fixed_parameter_count); 55 Location destination = Location::StackSlot(i - fixed_parameter_count);
56 Location source = deoptimization_env_->LocationAt(i); 56 Location source = deoptimization_env_->LocationAt(i);
57 if (!source.IsRegister() && !source.IsInvalid()) {
58 compiler->Bailout("unsupported deoptimization state");
59 }
60 if (source.IsInvalid()) { 57 if (source.IsInvalid()) {
61 ASSERT(values[i]->IsConstant()); 58 ASSERT(values[i]->IsConstant());
62 source = Location::Constant(values[i]->AsConstant()->value()); 59 source = Location::Constant(values[i]->AsConstant()->value());
63 } 60 }
64 move->AddMove(destination, source); 61 move->AddMove(destination, source);
65 } 62 }
66 compiler->parallel_move_resolver()->EmitNativeCode(move); 63 compiler->parallel_move_resolver()->EmitNativeCode(move);
67 } 64 }
68 65
69 if (compiler->IsLeaf()) { 66 if (compiler->IsLeaf()) {
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 __ popl(ECX); 1245 __ popl(ECX);
1249 __ popl(EAX); 1246 __ popl(EAX);
1250 } 1247 }
1251 1248
1252 1249
1253 #undef __ 1250 #undef __
1254 1251
1255 } // namespace dart 1252 } // namespace dart
1256 1253
1257 #endif // defined TARGET_ARCH_IA32 1254 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698