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

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

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

Powered by Google App Engine
This is Rietveld 408576698