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

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

Issue 2896903002: Shuffle around deopt id allocation to give the flow graph builder a chance to record other data as … (Closed)
Patch Set: . Created 3 years, 7 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/jit_optimizer.cc ('k') | runtime/vm/kernel_to_il.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/kernel_binary_flowgraph.h" 5 #include "vm/kernel_binary_flowgraph.h"
6 6
7 #include "vm/longjump.h" 7 #include "vm/longjump.h"
8 #include "vm/object_store.h" 8 #include "vm/object_store.h"
9 9
10 #if !defined(DART_PRECOMPILED_RUNTIME) 10 #if !defined(DART_PRECOMPILED_RUNTIME)
(...skipping 3536 matching lines...) Expand 10 before | Expand all | Expand 10 after
3547 body += BuildStatement(); // read body. 3547 body += BuildStatement(); // read body.
3548 3548
3549 Instruction* entry; 3549 Instruction* entry;
3550 if (body.is_open()) { 3550 if (body.is_open()) {
3551 JoinEntryInstr* join = BuildJoinEntry(); 3551 JoinEntryInstr* join = BuildJoinEntry();
3552 body += Goto(join); 3552 body += Goto(join);
3553 3553
3554 Fragment loop(join); 3554 Fragment loop(join);
3555 loop += CheckStackOverflow(); 3555 loop += CheckStackOverflow();
3556 loop += condition; 3556 loop += condition;
3557 entry = new (Z) GotoInstr(join); 3557 entry = new (Z) GotoInstr(join, Thread::Current()->GetNextDeoptId());
3558 } else { 3558 } else {
3559 entry = condition.entry; 3559 entry = condition.entry;
3560 } 3560 }
3561 3561
3562 3562
3563 loop_depth_dec(); 3563 loop_depth_dec();
3564 return Fragment(entry, loop_exit); 3564 return Fragment(entry, loop_exit);
3565 } 3565 }
3566 3566
3567 Fragment StreamingFlowGraphBuilder::BuildDoStatement() { 3567 Fragment StreamingFlowGraphBuilder::BuildDoStatement() {
(...skipping 13 matching lines...) Expand all
3581 loop += body; 3581 loop += body;
3582 loop += TranslateCondition(&negate); // read condition. 3582 loop += TranslateCondition(&negate); // read condition.
3583 TargetEntryInstr* loop_repeat; 3583 TargetEntryInstr* loop_repeat;
3584 TargetEntryInstr* loop_exit; 3584 TargetEntryInstr* loop_exit;
3585 loop += BranchIfTrue(&loop_repeat, &loop_exit, negate); 3585 loop += BranchIfTrue(&loop_repeat, &loop_exit, negate);
3586 3586
3587 Fragment repeat(loop_repeat); 3587 Fragment repeat(loop_repeat);
3588 repeat += Goto(join); 3588 repeat += Goto(join);
3589 3589
3590 loop_depth_dec(); 3590 loop_depth_dec();
3591 return Fragment(new (Z) GotoInstr(join), loop_exit); 3591 return Fragment(new (Z) GotoInstr(join, Thread::Current()->GetNextDeoptId()),
3592 loop_exit);
3592 } 3593 }
3593 3594
3594 Fragment StreamingFlowGraphBuilder::BuildForStatement() { 3595 Fragment StreamingFlowGraphBuilder::BuildForStatement() {
3595 intptr_t offset = ReaderOffset() - 1; // Include the tag. 3596 intptr_t offset = ReaderOffset() - 1; // Include the tag.
3596 3597
3597 Fragment declarations; 3598 Fragment declarations;
3598 3599
3599 bool new_context = false; 3600 bool new_context = false;
3600 declarations += EnterScope(offset, &new_context); 3601 declarations += EnterScope(offset, &new_context);
3601 3602
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
4317 } 4318 }
4318 instructions += StoreLocal(position, variable); 4319 instructions += StoreLocal(position, variable);
4319 instructions += Drop(); 4320 instructions += Drop();
4320 return instructions; 4321 return instructions;
4321 } 4322 }
4322 4323
4323 } // namespace kernel 4324 } // namespace kernel
4324 } // namespace dart 4325 } // namespace dart
4325 4326
4326 #endif // !defined(DART_PRECOMPILED_RUNTIME) 4327 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/vm/jit_optimizer.cc ('k') | runtime/vm/kernel_to_il.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698