| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 8965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8976 return Symbols::Empty().raw(); | 8976 return Symbols::Empty().raw(); |
| 8977 } | 8977 } |
| 8978 } | 8978 } |
| 8979 | 8979 |
| 8980 | 8980 |
| 8981 RawString* Script::GetSnippet(intptr_t from_line, | 8981 RawString* Script::GetSnippet(intptr_t from_line, |
| 8982 intptr_t from_column, | 8982 intptr_t from_column, |
| 8983 intptr_t to_line, | 8983 intptr_t to_line, |
| 8984 intptr_t to_column) const { | 8984 intptr_t to_column) const { |
| 8985 const String& src = String::Handle(Source()); | 8985 const String& src = String::Handle(Source()); |
| 8986 if (src.IsNull()) { |
| 8987 ASSERT(Dart::IsRunningPrecompiledCode()); |
| 8988 return Symbols::OptimizedOut().raw(); |
| 8989 } |
| 8986 intptr_t length = src.Length(); | 8990 intptr_t length = src.Length(); |
| 8987 intptr_t line = 1 + line_offset(); | 8991 intptr_t line = 1 + line_offset(); |
| 8988 intptr_t column = 1; | 8992 intptr_t column = 1; |
| 8989 intptr_t scan_position = 0; | 8993 intptr_t scan_position = 0; |
| 8990 intptr_t snippet_start = -1; | 8994 intptr_t snippet_start = -1; |
| 8991 intptr_t snippet_end = -1; | 8995 intptr_t snippet_end = -1; |
| 8992 if (from_line - line_offset() == 1) { | 8996 if (from_line - line_offset() == 1) { |
| 8993 column += col_offset(); | 8997 column += col_offset(); |
| 8994 } | 8998 } |
| 8995 | 8999 |
| (...skipping 12923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21919 return tag_label.ToCString(); | 21923 return tag_label.ToCString(); |
| 21920 } | 21924 } |
| 21921 | 21925 |
| 21922 | 21926 |
| 21923 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21927 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 21924 Instance::PrintJSONImpl(stream, ref); | 21928 Instance::PrintJSONImpl(stream, ref); |
| 21925 } | 21929 } |
| 21926 | 21930 |
| 21927 | 21931 |
| 21928 } // namespace dart | 21932 } // namespace dart |
| OLD | NEW |