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

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

Issue 2680303002: Kernel debugging; service tests (Closed)
Patch Set: Address comments Created 3 years, 9 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/kernel_to_il.cc ('k') | runtime/vm/scanner.h » ('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) 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 9203 matching lines...) Expand 10 before | Expand all | Expand 10 after
9214 } else { 9214 } else {
9215 min = midpoint; 9215 min = midpoint;
9216 } 9216 }
9217 } 9217 }
9218 *line = min + 1; // Line numbers start at 1. 9218 *line = min + 1; // Line numbers start at 1.
9219 smi ^= line_starts_array.At(min); 9219 smi ^= line_starts_array.At(min);
9220 if (column != NULL) { 9220 if (column != NULL) {
9221 *column = offset - smi.Value() + 1; 9221 *column = offset - smi.Value() + 1;
9222 } 9222 }
9223 if (token_len != NULL) { 9223 if (token_len != NULL) {
9224 // We don't explicitly save this data. 9224 // We don't explicitly save this data: Load the source
9225 // TODO(jensj): Load the source and attempt to find it from there. 9225 // and find it from there.
9226 const String& source = String::Handle(zone, Source());
9227 ASSERT(source.Length() >= offset);
9226 *token_len = 1; 9228 *token_len = 1;
9229 if (Scanner::IsIdentStartChar(source.CharAt(offset))) {
9230 for (intptr_t i = offset + 1;
9231 i < source.Length() && Scanner::IsIdentChar(source.CharAt(i));
9232 ++i) {
9233 ++*token_len;
9234 }
9235 }
9227 } 9236 }
9228 return; 9237 return;
9229 } 9238 }
9230 9239
9231 const TokenStream& tkns = TokenStream::Handle(zone, tokens()); 9240 const TokenStream& tkns = TokenStream::Handle(zone, tokens());
9232 if (tkns.IsNull()) { 9241 if (tkns.IsNull()) {
9233 ASSERT((Dart::vm_snapshot_kind() == Snapshot::kAppAOT)); 9242 ASSERT((Dart::vm_snapshot_kind() == Snapshot::kAppAOT));
9234 *line = -1; 9243 *line = -1;
9235 if (column != NULL) { 9244 if (column != NULL) {
9236 *column = -1; 9245 *column = -1;
(...skipping 13702 matching lines...) Expand 10 before | Expand all | Expand 10 after
22939 return UserTag::null(); 22948 return UserTag::null();
22940 } 22949 }
22941 22950
22942 22951
22943 const char* UserTag::ToCString() const { 22952 const char* UserTag::ToCString() const {
22944 const String& tag_label = String::Handle(label()); 22953 const String& tag_label = String::Handle(label());
22945 return tag_label.ToCString(); 22954 return tag_label.ToCString();
22946 } 22955 }
22947 22956
22948 } // namespace dart 22957 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/kernel_to_il.cc ('k') | runtime/vm/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698