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

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

Issue 2680303002: Kernel debugging; service tests (Closed)
Patch Set: Changes based on feedback. Also fixed regress_28443_test Created 3 years, 10 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
OLDNEW
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/become.h" 10 #include "vm/become.h"
(...skipping 9101 matching lines...) Expand 10 before | Expand all | Expand 10 after
9112 } else { 9112 } else {
9113 min = midpoint; 9113 min = midpoint;
9114 } 9114 }
9115 } 9115 }
9116 *line = min + 1; 9116 *line = min + 1;
9117 smi ^= line_starts_array.At(min); 9117 smi ^= line_starts_array.At(min);
9118 if (column != NULL) { 9118 if (column != NULL) {
9119 *column = offset - smi.Value() + 1; 9119 *column = offset - smi.Value() + 1;
9120 } 9120 }
9121 if (token_len != NULL) { 9121 if (token_len != NULL) {
9122 // We don't explicitly save this data. 9122 // We don't explicitly save this data: Load the source
9123 // TODO(jensj): Load the source and attempt to find it from there. 9123 // and find it from there.
9124 const String& source = String::Handle(zone, Source());
9125 ASSERT(source.Length() >= offset);
9124 *token_len = 1; 9126 *token_len = 1;
9127 for (intptr_t i = offset + 1; i < source.Length(); ++i, ++*token_len) {
9128 uint16_t c = source.CharAt(i);
9129 if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
hausner 2017/02/14 13:16:04 You could use Scanner::IsIdentStartChar() and Scan
jensj 2017/02/14 13:23:54 Kevin suggested the same thing, but the methods ar
9130 (c >= '0' && c <= '9') || c == '_' || c == '$') {
9131 continue;
9132 }
9133 break;
9134 }
9125 } 9135 }
9126 return; 9136 return;
9127 } 9137 }
9128 9138
9129 const TokenStream& tkns = TokenStream::Handle(zone, tokens()); 9139 const TokenStream& tkns = TokenStream::Handle(zone, tokens());
9130 if (tkns.IsNull()) { 9140 if (tkns.IsNull()) {
9131 ASSERT((Dart::vm_snapshot_kind() == Snapshot::kAppAOT)); 9141 ASSERT((Dart::vm_snapshot_kind() == Snapshot::kAppAOT));
9132 *line = -1; 9142 *line = -1;
9133 if (column != NULL) { 9143 if (column != NULL) {
9134 *column = -1; 9144 *column = -1;
(...skipping 13599 matching lines...) Expand 10 before | Expand all | Expand 10 after
22734 return UserTag::null(); 22744 return UserTag::null();
22735 } 22745 }
22736 22746
22737 22747
22738 const char* UserTag::ToCString() const { 22748 const char* UserTag::ToCString() const {
22739 const String& tag_label = String::Handle(label()); 22749 const String& tag_label = String::Handle(label());
22740 return tag_label.ToCString(); 22750 return tag_label.ToCString();
22741 } 22751 }
22742 22752
22743 } // namespace dart 22753 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698