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

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

Issue 9385022: Add PC descriptor for ret instruction (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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 | Annotate | Revision Log
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 "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/bootstrap.h" 10 #include "vm/bootstrap.h"
(...skipping 4845 matching lines...) Expand 10 before | Expand all | Expand 10 after
4856 NoGCScope no_gc; 4856 NoGCScope no_gc;
4857 result ^= raw; 4857 result ^= raw;
4858 result.SetLength(num_descriptors); 4858 result.SetLength(num_descriptors);
4859 } 4859 }
4860 return result.raw(); 4860 return result.raw();
4861 } 4861 }
4862 4862
4863 4863
4864 const char* PcDescriptors::KindAsStr(intptr_t index) const { 4864 const char* PcDescriptors::KindAsStr(intptr_t index) const {
4865 switch (DescriptorKind(index)) { 4865 switch (DescriptorKind(index)) {
4866 case (PcDescriptors::kDeopt) : return "deopt"; 4866 case PcDescriptors::kDeopt: return "deopt";
4867 case (PcDescriptors::kPatchCode) : return "patch"; 4867 case PcDescriptors::kPatchCode: return "patch";
4868 case (PcDescriptors::kIcCall) : return "ic-call"; 4868 case PcDescriptors::kIcCall: return "ic-call";
4869 case (PcDescriptors::kOther) : return "other"; 4869 case PcDescriptors::kReturn: return "return";
4870 case PcDescriptors::kOther: return "other";
4870 } 4871 }
4871 UNREACHABLE(); 4872 UNREACHABLE();
4872 return ""; 4873 return "";
4873 } 4874 }
4874 4875
4875 4876
4876 const char* PcDescriptors::ToCString() const { 4877 const char* PcDescriptors::ToCString() const {
4877 if (Length() == 0) { 4878 if (Length() == 0) {
4878 return "No pc descriptors\n"; 4879 return "No pc descriptors\n";
4879 } 4880 }
(...skipping 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after
7976 const String& str = String::Handle(pattern()); 7977 const String& str = String::Handle(pattern());
7977 const char* format = "JSRegExp: pattern=%s flags=%s"; 7978 const char* format = "JSRegExp: pattern=%s flags=%s";
7978 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); 7979 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags());
7979 char* chars = reinterpret_cast<char*>( 7980 char* chars = reinterpret_cast<char*>(
7980 Isolate::Current()->current_zone()->Allocate(len + 1)); 7981 Isolate::Current()->current_zone()->Allocate(len + 1));
7981 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); 7982 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags());
7982 return chars; 7983 return chars;
7983 } 7984 }
7984 7985
7985 } // namespace dart 7986 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698