| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/assert.h" | 8 #include "vm/assert.h" |
| 9 #include "vm/bigint_operations.h" | 9 #include "vm/bigint_operations.h" |
| 10 #include "vm/bootstrap.h" | 10 #include "vm/bootstrap.h" |
| (...skipping 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2456 | 2456 |
| 2457 RawTypeArguments* TypeArguments::NewInstantiatedTypeArguments( | 2457 RawTypeArguments* TypeArguments::NewInstantiatedTypeArguments( |
| 2458 const TypeArguments& uninstantiated_type_arguments, | 2458 const TypeArguments& uninstantiated_type_arguments, |
| 2459 const TypeArguments& instantiator_type_arguments) { | 2459 const TypeArguments& instantiator_type_arguments) { |
| 2460 return InstantiatedTypeArguments::New(uninstantiated_type_arguments, | 2460 return InstantiatedTypeArguments::New(uninstantiated_type_arguments, |
| 2461 instantiator_type_arguments); | 2461 instantiator_type_arguments); |
| 2462 } | 2462 } |
| 2463 | 2463 |
| 2464 | 2464 |
| 2465 const char* TypeArguments::ToCString() const { | 2465 const char* TypeArguments::ToCString() const { |
| 2466 // TypeArguments is an abstract class. | 2466 // TypeArguments is an abstract class, however it may wrap a null. |
| 2467 if (IsNull()) { |
| 2468 return "NULL TypeArguments"; |
| 2469 } |
| 2467 UNREACHABLE(); | 2470 UNREACHABLE(); |
| 2468 return "TypeArguments"; | 2471 return "TypeArguments"; |
| 2469 } | 2472 } |
| 2470 | 2473 |
| 2471 | 2474 |
| 2472 intptr_t TypeArray::Length() const { | 2475 intptr_t TypeArray::Length() const { |
| 2473 ASSERT(!IsNull()); | 2476 ASSERT(!IsNull()); |
| 2474 return Smi::Value(raw_ptr()->length_); | 2477 return Smi::Value(raw_ptr()->length_); |
| 2475 } | 2478 } |
| 2476 | 2479 |
| (...skipping 4780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7257 const String& str = String::Handle(pattern()); | 7260 const String& str = String::Handle(pattern()); |
| 7258 const char* format = "JSRegExp: pattern=%s flags=%s"; | 7261 const char* format = "JSRegExp: pattern=%s flags=%s"; |
| 7259 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); | 7262 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); |
| 7260 char* chars = reinterpret_cast<char*>( | 7263 char* chars = reinterpret_cast<char*>( |
| 7261 Isolate::Current()->current_zone()->Allocate(len + 1)); | 7264 Isolate::Current()->current_zone()->Allocate(len + 1)); |
| 7262 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); | 7265 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); |
| 7263 return chars; | 7266 return chars; |
| 7264 } | 7267 } |
| 7265 | 7268 |
| 7266 } // namespace dart | 7269 } // namespace dart |
| OLD | NEW |