OLD | NEW |
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 4849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4860 } | 4860 } |
4861 return result.raw(); | 4861 return result.raw(); |
4862 } | 4862 } |
4863 | 4863 |
4864 | 4864 |
4865 const char* PcDescriptors::KindAsStr(intptr_t index) const { | 4865 const char* PcDescriptors::KindAsStr(intptr_t index) const { |
4866 switch (DescriptorKind(index)) { | 4866 switch (DescriptorKind(index)) { |
4867 case PcDescriptors::kDeopt: return "deopt"; | 4867 case PcDescriptors::kDeopt: return "deopt"; |
4868 case PcDescriptors::kPatchCode: return "patch"; | 4868 case PcDescriptors::kPatchCode: return "patch"; |
4869 case PcDescriptors::kIcCall: return "ic-call"; | 4869 case PcDescriptors::kIcCall: return "ic-call"; |
| 4870 case PcDescriptors::kFuncCall: return "func-call"; |
4870 case PcDescriptors::kReturn: return "return"; | 4871 case PcDescriptors::kReturn: return "return"; |
4871 case PcDescriptors::kOther: return "other"; | 4872 case PcDescriptors::kOther: return "other"; |
4872 } | 4873 } |
4873 UNREACHABLE(); | 4874 UNREACHABLE(); |
4874 return ""; | 4875 return ""; |
4875 } | 4876 } |
4876 | 4877 |
4877 | 4878 |
4878 const char* PcDescriptors::ToCString() const { | 4879 const char* PcDescriptors::ToCString() const { |
4879 if (Length() == 0) { | 4880 if (Length() == 0) { |
(...skipping 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8037 const String& str = String::Handle(pattern()); | 8038 const String& str = String::Handle(pattern()); |
8038 const char* format = "JSRegExp: pattern=%s flags=%s"; | 8039 const char* format = "JSRegExp: pattern=%s flags=%s"; |
8039 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); | 8040 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); |
8040 char* chars = reinterpret_cast<char*>( | 8041 char* chars = reinterpret_cast<char*>( |
8041 Isolate::Current()->current_zone()->Allocate(len + 1)); | 8042 Isolate::Current()->current_zone()->Allocate(len + 1)); |
8042 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); | 8043 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); |
8043 return chars; | 8044 return chars; |
8044 } | 8045 } |
8045 | 8046 |
8046 } // namespace dart | 8047 } // namespace dart |
OLD | NEW |