| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 } else if (instr->MayThrow() && | 437 } else if (instr->MayThrow() && |
| 438 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) { | 438 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) { |
| 439 // Optimized try-block: Sync locals to fixed stack locations. | 439 // Optimized try-block: Sync locals to fixed stack locations. |
| 440 EmitTrySync(instr, CurrentTryIndex()); | 440 EmitTrySync(instr, CurrentTryIndex()); |
| 441 } | 441 } |
| 442 } | 442 } |
| 443 | 443 |
| 444 | 444 |
| 445 | 445 |
| 446 void FlowGraphCompiler::EmitSourceLine(Instruction* instr) { | 446 void FlowGraphCompiler::EmitSourceLine(Instruction* instr) { |
| 447 if ((instr->token_pos() == Scanner::kNoSourcePos) || (instr->env() == NULL)) { | 447 if ((instr->token_pos() < 0) || (instr->env() == NULL)) { |
| 448 return; | 448 return; |
| 449 } | 449 } |
| 450 const Script& script = | 450 const Script& script = |
| 451 Script::Handle(zone(), instr->env()->function().script()); | 451 Script::Handle(zone(), instr->env()->function().script()); |
| 452 intptr_t line_nr; | 452 intptr_t line_nr; |
| 453 intptr_t column_nr; | 453 intptr_t column_nr; |
| 454 script.GetTokenLocation(instr->token_pos(), &line_nr, &column_nr); | 454 script.GetTokenLocation(instr->token_pos(), &line_nr, &column_nr); |
| 455 const String& line = String::Handle(zone(), script.GetLine(line_nr)); | 455 const String& line = String::Handle(zone(), script.GetLine(line_nr)); |
| 456 assembler()->Comment("Line %" Pd " in '%s':\n %s", | 456 assembler()->Comment("Line %" Pd " in '%s':\n %s", |
| 457 line_nr, | 457 line_nr, |
| (...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1877 | 1877 |
| 1878 | 1878 |
| 1879 void FlowGraphCompiler::FrameStateClear() { | 1879 void FlowGraphCompiler::FrameStateClear() { |
| 1880 ASSERT(!is_optimizing()); | 1880 ASSERT(!is_optimizing()); |
| 1881 frame_state_.TruncateTo(0); | 1881 frame_state_.TruncateTo(0); |
| 1882 } | 1882 } |
| 1883 #endif | 1883 #endif |
| 1884 | 1884 |
| 1885 | 1885 |
| 1886 } // namespace dart | 1886 } // namespace dart |
| OLD | NEW |