| 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 "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 cls = CreateAndRegisterInterface("List", script, core_lib); | 733 cls = CreateAndRegisterInterface("List", script, core_lib); |
| 734 pending_classes.Add(cls, Heap::kOld); | 734 pending_classes.Add(cls, Heap::kOld); |
| 735 type = Type::NewNonParameterizedType(cls); | 735 type = Type::NewNonParameterizedType(cls); |
| 736 object_store->set_list_interface(type); | 736 object_store->set_list_interface(type); |
| 737 | 737 |
| 738 cls = CreateAndRegisterInterface("ByteArray", script, core_lib); | 738 cls = CreateAndRegisterInterface("ByteArray", script, core_lib); |
| 739 pending_classes.Add(cls, Heap::kOld); | 739 pending_classes.Add(cls, Heap::kOld); |
| 740 type = Type::NewNonParameterizedType(cls); | 740 type = Type::NewNonParameterizedType(cls); |
| 741 object_store->set_byte_array_interface(type); | 741 object_store->set_byte_array_interface(type); |
| 742 | 742 |
| 743 cls = object_store->smi_class(); |
| 744 type = Type::NewNonParameterizedType(cls); |
| 745 object_store->set_smi_type(type); |
| 746 |
| 747 cls = object_store->double_class(); |
| 748 type = Type::NewNonParameterizedType(cls); |
| 749 object_store->set_double_type(type); |
| 750 |
| 751 cls = object_store->mint_class(); |
| 752 type = Type::NewNonParameterizedType(cls); |
| 753 object_store->set_mint_type(type); |
| 754 |
| 743 // The classes 'Null' and 'void' are not registered in the class dictionary, | 755 // The classes 'Null' and 'void' are not registered in the class dictionary, |
| 744 // because their names are reserved keywords. Their names are not heap | 756 // because their names are reserved keywords. Their names are not heap |
| 745 // allocated, because the classes reside in the VM isolate. | 757 // allocated, because the classes reside in the VM isolate. |
| 746 // The corresponding types are stored in the object store. | 758 // The corresponding types are stored in the object store. |
| 747 cls = null_class(); | 759 cls = null_class(); |
| 748 type = Type::NewNonParameterizedType(cls); | 760 type = Type::NewNonParameterizedType(cls); |
| 749 object_store->set_null_type(type); | 761 object_store->set_null_type(type); |
| 750 | 762 |
| 751 cls = void_class(); | 763 cls = void_class(); |
| 752 type = Type::NewNonParameterizedType(cls); | 764 type = Type::NewNonParameterizedType(cls); |
| (...skipping 10448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11201 const char* JSRegExp::ToCString() const { | 11213 const char* JSRegExp::ToCString() const { |
| 11202 const String& str = String::Handle(pattern()); | 11214 const String& str = String::Handle(pattern()); |
| 11203 const char* format = "JSRegExp: pattern=%s flags=%s"; | 11215 const char* format = "JSRegExp: pattern=%s flags=%s"; |
| 11204 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); | 11216 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); |
| 11205 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len + 1); | 11217 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len + 1); |
| 11206 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); | 11218 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); |
| 11207 return chars; | 11219 return chars; |
| 11208 } | 11220 } |
| 11209 | 11221 |
| 11210 } // namespace dart | 11222 } // namespace dart |
| OLD | NEW |