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

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

Issue 2388093003: VM: Make optimized try-catch work in DBC. (Closed)
Patch Set: new test file Created 4 years, 2 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 12147 matching lines...) Expand 10 before | Expand all | Expand 10 after
12158 // PC. StackmapTableBuilder::FinalizeStackmaps will replace it with the pc 12158 // PC. StackmapTableBuilder::FinalizeStackmaps will replace it with the pc
12159 // address. 12159 // address.
12160 ASSERT(pc_offset >= 0); 12160 ASSERT(pc_offset >= 0);
12161 result.SetPcOffset(pc_offset); 12161 result.SetPcOffset(pc_offset);
12162 result.SetSlowPathBitCount(slow_path_bit_count); 12162 result.SetSlowPathBitCount(slow_path_bit_count);
12163 return result.raw(); 12163 return result.raw();
12164 } 12164 }
12165 12165
12166 12166
12167 const char* Stackmap::ToCString() const { 12167 const char* Stackmap::ToCString() const {
12168 #define FORMAT "%#x: " 12168 #define FORMAT "%#05x: "
12169 if (IsNull()) { 12169 if (IsNull()) {
12170 return "{null}"; 12170 return "{null}";
12171 } else { 12171 } else {
12172 intptr_t fixed_length = OS::SNPrint(NULL, 0, FORMAT, PcOffset()) + 1; 12172 intptr_t fixed_length = OS::SNPrint(NULL, 0, FORMAT, PcOffset()) + 1;
12173 Thread* thread = Thread::Current(); 12173 Thread* thread = Thread::Current();
12174 // Guard against integer overflow in the computation of alloc_size. 12174 // Guard against integer overflow in the computation of alloc_size.
12175 // 12175 //
12176 // TODO(kmillikin): We could just truncate the string if someone 12176 // TODO(kmillikin): We could just truncate the string if someone
12177 // tries to print a 2 billion plus entry stackmap. 12177 // tries to print a 2 billion plus entry stackmap.
12178 if (Length() > (kIntptrMax - fixed_length)) { 12178 if (Length() > (kIntptrMax - fixed_length)) {
(...skipping 10824 matching lines...) Expand 10 before | Expand all | Expand 10 after
23003 return UserTag::null(); 23003 return UserTag::null();
23004 } 23004 }
23005 23005
23006 23006
23007 const char* UserTag::ToCString() const { 23007 const char* UserTag::ToCString() const {
23008 const String& tag_label = String::Handle(label()); 23008 const String& tag_label = String::Handle(label());
23009 return tag_label.ToCString(); 23009 return tag_label.ToCString();
23010 } 23010 }
23011 23011
23012 } // namespace dart 23012 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698