| 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 6928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6939 return result.raw(); | 6939 return result.raw(); |
| 6940 } | 6940 } |
| 6941 | 6941 |
| 6942 | 6942 |
| 6943 void UnwindError::set_message(const String& message) const { | 6943 void UnwindError::set_message(const String& message) const { |
| 6944 StorePointer(&raw_ptr()->message_, message.raw()); | 6944 StorePointer(&raw_ptr()->message_, message.raw()); |
| 6945 } | 6945 } |
| 6946 | 6946 |
| 6947 | 6947 |
| 6948 const char* UnwindError::ToErrorCString() const { | 6948 const char* UnwindError::ToErrorCString() const { |
| 6949 UNIMPLEMENTED(); | 6949 const String& msg_str = String::Handle(message()); |
| 6950 return "UnwindError"; | 6950 return msg_str.ToCString(); |
| 6951 } | 6951 } |
| 6952 | 6952 |
| 6953 | 6953 |
| 6954 const char* UnwindError::ToCString() const { | 6954 const char* UnwindError::ToCString() const { |
| 6955 return "UnwindError"; | 6955 return "UnwindError"; |
| 6956 } | 6956 } |
| 6957 | 6957 |
| 6958 | 6958 |
| 6959 bool Instance::Equals(const Instance& other) const { | 6959 bool Instance::Equals(const Instance& other) const { |
| 6960 if (this->raw() == other.raw()) { | 6960 if (this->raw() == other.raw()) { |
| (...skipping 3152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10113 const String& str = String::Handle(pattern()); | 10113 const String& str = String::Handle(pattern()); |
| 10114 const char* format = "JSRegExp: pattern=%s flags=%s"; | 10114 const char* format = "JSRegExp: pattern=%s flags=%s"; |
| 10115 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); | 10115 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); |
| 10116 char* chars = reinterpret_cast<char*>( | 10116 char* chars = reinterpret_cast<char*>( |
| 10117 Isolate::Current()->current_zone()->Allocate(len + 1)); | 10117 Isolate::Current()->current_zone()->Allocate(len + 1)); |
| 10118 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); | 10118 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); |
| 10119 return chars; | 10119 return chars; |
| 10120 } | 10120 } |
| 10121 | 10121 |
| 10122 } // namespace dart | 10122 } // namespace dart |
| OLD | NEW |