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

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

Issue 2762313003: Dwarf tools interpret line number table pc's as start boundries instead of end boundries. (Closed)
Patch Set: test 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
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 9132 matching lines...) Expand 10 before | Expand all | Expand 10 after
9143 ASSERT(col_offset >= 0); 9143 ASSERT(col_offset >= 0);
9144 StoreNonPointer(&raw_ptr()->line_offset_, line_offset); 9144 StoreNonPointer(&raw_ptr()->line_offset_, line_offset);
9145 StoreNonPointer(&raw_ptr()->col_offset_, col_offset); 9145 StoreNonPointer(&raw_ptr()->col_offset_, col_offset);
9146 } 9146 }
9147 9147
9148 9148
9149 // Specialized for AOT compilation, which does this lookup for every token 9149 // Specialized for AOT compilation, which does this lookup for every token
9150 // position that could be part of a stack trace. 9150 // position that could be part of a stack trace.
9151 intptr_t Script::GetTokenLineUsingLineStarts( 9151 intptr_t Script::GetTokenLineUsingLineStarts(
9152 TokenPosition target_token_pos) const { 9152 TokenPosition target_token_pos) const {
9153 if (target_token_pos.IsNoSource()) {
9154 return 0;
9155 }
9153 Zone* zone = Thread::Current()->zone(); 9156 Zone* zone = Thread::Current()->zone();
9154 Array& line_starts_array = Array::Handle(zone, line_starts()); 9157 Array& line_starts_array = Array::Handle(zone, line_starts());
9155 Smi& token_pos = Smi::Handle(zone); 9158 Smi& token_pos = Smi::Handle(zone);
9156 if (line_starts_array.IsNull()) { 9159 if (line_starts_array.IsNull()) {
9157 ASSERT(kind() != RawScript::kKernelTag); 9160 ASSERT(kind() != RawScript::kKernelTag);
9158 GrowableObjectArray& line_starts_list = 9161 GrowableObjectArray& line_starts_list =
9159 GrowableObjectArray::Handle(zone, GrowableObjectArray::New()); 9162 GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
9160 const TokenStream& tkns = TokenStream::Handle(zone, tokens()); 9163 const TokenStream& tkns = TokenStream::Handle(zone, tokens());
9161 TokenStream::Iterator tkit(zone, tkns, TokenPosition::kMinSource, 9164 TokenStream::Iterator tkit(zone, tkns, TokenPosition::kMinSource,
9162 TokenStream::Iterator::kAllTokens); 9165 TokenStream::Iterator::kAllTokens);
(...skipping 13888 matching lines...) Expand 10 before | Expand all | Expand 10 after
23051 return UserTag::null(); 23054 return UserTag::null();
23052 } 23055 }
23053 23056
23054 23057
23055 const char* UserTag::ToCString() const { 23058 const char* UserTag::ToCString() const {
23056 const String& tag_label = String::Handle(label()); 23059 const String& tag_label = String::Handle(label());
23057 return tag_label.ToCString(); 23060 return tag_label.ToCString();
23058 } 23061 }
23059 23062
23060 } // namespace dart 23063 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698