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

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

Issue 1568353002: Don't test directly against Scanner::kNoSourcePos instead use >= 0. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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_builder.cc ('k') | runtime/vm/flow_graph_compiler_arm.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_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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698