| 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 6913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6924 return result.raw(); | 6924 return result.raw(); |
| 6925 } | 6925 } |
| 6926 | 6926 |
| 6927 | 6927 |
| 6928 void UnwindError::set_message(const String& message) const { | 6928 void UnwindError::set_message(const String& message) const { |
| 6929 StorePointer(&raw_ptr()->message_, message.raw()); | 6929 StorePointer(&raw_ptr()->message_, message.raw()); |
| 6930 } | 6930 } |
| 6931 | 6931 |
| 6932 | 6932 |
| 6933 const char* UnwindError::ToErrorCString() const { | 6933 const char* UnwindError::ToErrorCString() const { |
| 6934 UNIMPLEMENTED(); | 6934 const String& msg_str = String::Handle(message()); |
| 6935 return "UnwindError"; | 6935 return msg_str.ToCString(); |
| 6936 } | 6936 } |
| 6937 | 6937 |
| 6938 | 6938 |
| 6939 const char* UnwindError::ToCString() const { | 6939 const char* UnwindError::ToCString() const { |
| 6940 return "UnwindError"; | 6940 return "UnwindError"; |
| 6941 } | 6941 } |
| 6942 | 6942 |
| 6943 | 6943 |
| 6944 bool Instance::Equals(const Instance& other) const { | 6944 bool Instance::Equals(const Instance& other) const { |
| 6945 if (this->raw() == other.raw()) { | 6945 if (this->raw() == other.raw()) { |
| (...skipping 3152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10098 const String& str = String::Handle(pattern()); | 10098 const String& str = String::Handle(pattern()); |
| 10099 const char* format = "JSRegExp: pattern=%s flags=%s"; | 10099 const char* format = "JSRegExp: pattern=%s flags=%s"; |
| 10100 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); | 10100 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); |
| 10101 char* chars = reinterpret_cast<char*>( | 10101 char* chars = reinterpret_cast<char*>( |
| 10102 Isolate::Current()->current_zone()->Allocate(len + 1)); | 10102 Isolate::Current()->current_zone()->Allocate(len + 1)); |
| 10103 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); | 10103 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); |
| 10104 return chars; | 10104 return chars; |
| 10105 } | 10105 } |
| 10106 | 10106 |
| 10107 } // namespace dart | 10107 } // namespace dart |
| OLD | NEW |