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

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

Issue 2903993002: Remember deopt-id -> context-level mappings in var descriptors. (Closed)
Patch Set: update descriptor tests Created 3 years, 6 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/parser_test.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) 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 12566 matching lines...) Expand 10 before | Expand all | Expand 10 after
12577 12577
12578 12578
12579 static int PrintVarInfo(char* buffer, 12579 static int PrintVarInfo(char* buffer,
12580 int len, 12580 int len,
12581 intptr_t i, 12581 intptr_t i,
12582 const String& var_name, 12582 const String& var_name,
12583 const RawLocalVarDescriptors::VarInfo& info) { 12583 const RawLocalVarDescriptors::VarInfo& info) {
12584 const RawLocalVarDescriptors::VarInfoKind kind = info.kind(); 12584 const RawLocalVarDescriptors::VarInfoKind kind = info.kind();
12585 const int32_t index = info.index(); 12585 const int32_t index = info.index();
12586 if (kind == RawLocalVarDescriptors::kContextLevel) { 12586 if (kind == RawLocalVarDescriptors::kContextLevel) {
12587 return OS::SNPrint(buffer, len, "%2" Pd 12587 return OS::SNPrint(buffer, len,
12588 " %-13s level=%-3d scope=%-3d" 12588 "%2" Pd
12589 " begin=%-3d end=%d\n", 12589 " %-13s level=%-3d"
12590 " begin=%-3d end=%d\n",
12590 i, LocalVarDescriptors::KindToCString(kind), index, 12591 i, LocalVarDescriptors::KindToCString(kind), index,
12591 info.scope_id, static_cast<int>(info.begin_pos.Pos()), 12592 static_cast<int>(info.begin_pos.value()),
12592 static_cast<int>(info.end_pos.Pos())); 12593 static_cast<int>(info.end_pos.value()));
12593 } else if (kind == RawLocalVarDescriptors::kContextVar) { 12594 } else if (kind == RawLocalVarDescriptors::kContextVar) {
12594 return OS::SNPrint( 12595 return OS::SNPrint(
12595 buffer, len, "%2" Pd 12596 buffer, len, "%2" Pd
12596 " %-13s level=%-3d index=%-3d" 12597 " %-13s level=%-3d index=%-3d"
12597 " begin=%-3d end=%-3d name=%s\n", 12598 " begin=%-3d end=%-3d name=%s\n",
12598 i, LocalVarDescriptors::KindToCString(kind), info.scope_id, index, 12599 i, LocalVarDescriptors::KindToCString(kind), info.scope_id, index,
12599 static_cast<int>(info.begin_pos.Pos()), 12600 static_cast<int>(info.begin_pos.Pos()),
12600 static_cast<int>(info.end_pos.Pos()), var_name.ToCString()); 12601 static_cast<int>(info.end_pos.Pos()), var_name.ToCString());
12601 } else { 12602 } else {
12602 return OS::SNPrint( 12603 return OS::SNPrint(
(...skipping 10750 matching lines...) Expand 10 before | Expand all | Expand 10 after
23353 return UserTag::null(); 23354 return UserTag::null();
23354 } 23355 }
23355 23356
23356 23357
23357 const char* UserTag::ToCString() const { 23358 const char* UserTag::ToCString() const {
23358 const String& tag_label = String::Handle(label()); 23359 const String& tag_label = String::Handle(label());
23359 return tag_label.ToCString(); 23360 return tag_label.ToCString();
23360 } 23361 }
23361 23362
23362 } // namespace dart 23363 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/kernel_to_il.cc ('k') | runtime/vm/parser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698