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

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

Issue 2392613002: Reapply "Lazy deopt without code patching." (Closed)
Patch Set: . Created 4 years, 2 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 } 1116 }
1117 } 1117 }
1118 } 1118 }
1119 1119
1120 EndCodeSourceRange(TokenPosition::kDartCodePrologue); 1120 EndCodeSourceRange(TokenPosition::kDartCodePrologue);
1121 ASSERT(!block_order().is_empty()); 1121 ASSERT(!block_order().is_empty());
1122 VisitBlocks(); 1122 VisitBlocks();
1123 1123
1124 __ int3(); 1124 __ int3();
1125 GenerateDeferredCode(); 1125 GenerateDeferredCode();
1126
1127 BeginCodeSourceRange();
1128 if (is_optimizing() && !FLAG_precompiled_mode) {
1129 // Leave enough space for patching in case of lazy deoptimization.
1130 __ nop(CallPattern::pattern_length_in_bytes());
1131 lazy_deopt_return_pc_offset_ = assembler()->CodeSize();
1132 __ Jmp(*StubCode::DeoptimizeLazyFromReturn_entry());
1133 lazy_deopt_throw_pc_offset_ = assembler()->CodeSize();
1134 __ Jmp(*StubCode::DeoptimizeLazyFromThrow_entry());
1135 }
1136 EndCodeSourceRange(TokenPosition::kDartCodeEpilogue);
1137 } 1126 }
1138 1127
1139 1128
1140 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, 1129 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos,
1141 const StubEntry& stub_entry, 1130 const StubEntry& stub_entry,
1142 RawPcDescriptors::Kind kind, 1131 RawPcDescriptors::Kind kind,
1143 LocationSummary* locs) { 1132 LocationSummary* locs) {
1144 __ Call(stub_entry); 1133 __ Call(stub_entry);
1145 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); 1134 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos);
1146 RecordSafepoint(locs); 1135 RecordSafepoint(locs);
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 __ movups(reg, Address(ESP, 0)); 1840 __ movups(reg, Address(ESP, 0));
1852 __ addl(ESP, Immediate(kFpuRegisterSize)); 1841 __ addl(ESP, Immediate(kFpuRegisterSize));
1853 } 1842 }
1854 1843
1855 1844
1856 #undef __ 1845 #undef __
1857 1846
1858 } // namespace dart 1847 } // namespace dart
1859 1848
1860 #endif // defined TARGET_ARCH_IA32 1849 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698