| 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 core_lib.AddClass(cls); | 542 core_lib.AddClass(cls); |
| 543 type = Type::NewNonParameterizedType(cls); | 543 type = Type::NewNonParameterizedType(cls); |
| 544 object_store->set_string_interface(type); | 544 object_store->set_string_interface(type); |
| 545 | 545 |
| 546 name = String::NewSymbol("bool"); | 546 name = String::NewSymbol("bool"); |
| 547 cls = Class::NewInterface(name, script); | 547 cls = Class::NewInterface(name, script); |
| 548 core_lib.AddClass(cls); | 548 core_lib.AddClass(cls); |
| 549 type = Type::NewNonParameterizedType(cls); | 549 type = Type::NewNonParameterizedType(cls); |
| 550 object_store->set_bool_interface(type); | 550 object_store->set_bool_interface(type); |
| 551 | 551 |
| 552 name = String::NewSymbol("Array"); | |
| 553 cls = Class::NewInterface(name, script); | |
| 554 core_impl_lib.AddClass(cls); | |
| 555 | |
| 556 // The classes 'null', 'var', and 'void' are not registered in the class | 552 // The classes 'null', 'var', and 'void' are not registered in the class |
| 557 // dictionary and are not named, but corresponding types are stored in the | 553 // dictionary and are not named, but corresponding types are stored in the |
| 558 // object store. | 554 // object store. |
| 559 cls = null_class_; | 555 cls = null_class_; |
| 560 type = Type::NewNonParameterizedType(cls); | 556 type = Type::NewNonParameterizedType(cls); |
| 561 object_store->set_null_type(type); | 557 object_store->set_null_type(type); |
| 562 | 558 |
| 563 cls = var_class_; | 559 cls = var_class_; |
| 564 type = Type::NewNonParameterizedType(cls); | 560 type = Type::NewNonParameterizedType(cls); |
| 565 object_store->set_var_type(type); | 561 object_store->set_var_type(type); |
| (...skipping 5921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6487 const String& str = String::Handle(pattern()); | 6483 const String& str = String::Handle(pattern()); |
| 6488 const char* format = "JSRegExp: pattern=%s flags=%s"; | 6484 const char* format = "JSRegExp: pattern=%s flags=%s"; |
| 6489 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); | 6485 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); |
| 6490 char* chars = reinterpret_cast<char*>( | 6486 char* chars = reinterpret_cast<char*>( |
| 6491 Isolate::Current()->current_zone()->Allocate(len + 1)); | 6487 Isolate::Current()->current_zone()->Allocate(len + 1)); |
| 6492 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); | 6488 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); |
| 6493 return chars; | 6489 return chars; |
| 6494 } | 6490 } |
| 6495 | 6491 |
| 6496 } // namespace dart | 6492 } // namespace dart |
| OLD | NEW |