OLD | NEW |
---|---|
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_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/bit_vector.h" | 9 #include "vm/bit_vector.h" |
10 #include "vm/cha.h" | 10 #include "vm/cha.h" |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
535 // Compile all successors until an exit, branch, or a block entry. | 535 // Compile all successors until an exit, branch, or a block entry. |
536 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { | 536 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { |
537 Instruction* instr = it.Current(); | 537 Instruction* instr = it.Current(); |
538 // Compose intervals. | 538 // Compose intervals. |
539 if (instr->has_inlining_id() && is_optimizing()) { | 539 if (instr->has_inlining_id() && is_optimizing()) { |
540 if (prev_inlining_id != instr->inlining_id()) { | 540 if (prev_inlining_id != instr->inlining_id()) { |
541 intervals.Add( | 541 intervals.Add( |
542 IntervalStruct(prev_offset, prev_inlining_pos, prev_inlining_id)); | 542 IntervalStruct(prev_offset, prev_inlining_pos, prev_inlining_id)); |
543 prev_offset = assembler()->CodeSize(); | 543 prev_offset = assembler()->CodeSize(); |
544 prev_inlining_id = instr->inlining_id(); | 544 prev_inlining_id = instr->inlining_id(); |
545 prev_inlining_pos = inline_id_to_token_pos_[prev_inlining_id]; | 545 if (prev_inlining_id < inline_id_to_token_pos_.length()) { |
srdjan
2016/03/02 19:02:55
Add comment something like: id_to_token_pos is add
Cutch
2016/03/02 19:14:07
Done.
| |
546 prev_inlining_pos = inline_id_to_token_pos_[prev_inlining_id]; | |
547 } else { | |
548 prev_inlining_pos = TokenPosition::kNoSource; | |
549 } | |
546 if (prev_inlining_id > max_inlining_id) { | 550 if (prev_inlining_id > max_inlining_id) { |
547 max_inlining_id = prev_inlining_id; | 551 max_inlining_id = prev_inlining_id; |
548 } | 552 } |
549 } | 553 } |
550 } | 554 } |
551 if (FLAG_code_comments || | 555 if (FLAG_code_comments || |
552 FLAG_disassemble || FLAG_disassemble_optimized) { | 556 FLAG_disassemble || FLAG_disassemble_optimized) { |
553 if (FLAG_source_lines) { | 557 if (FLAG_source_lines) { |
554 EmitSourceLine(instr); | 558 EmitSourceLine(instr); |
555 } | 559 } |
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1935 | 1939 |
1936 | 1940 |
1937 void FlowGraphCompiler::FrameStateClear() { | 1941 void FlowGraphCompiler::FrameStateClear() { |
1938 ASSERT(!is_optimizing()); | 1942 ASSERT(!is_optimizing()); |
1939 frame_state_.TruncateTo(0); | 1943 frame_state_.TruncateTo(0); |
1940 } | 1944 } |
1941 #endif | 1945 #endif |
1942 | 1946 |
1943 | 1947 |
1944 } // namespace dart | 1948 } // namespace dart |
OLD | NEW |