| 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 5355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5366 result.raw_ptr()->name_ = url.raw(); | 5366 result.raw_ptr()->name_ = url.raw(); |
| 5367 result.raw_ptr()->url_ = url.raw(); | 5367 result.raw_ptr()->url_ = url.raw(); |
| 5368 result.raw_ptr()->private_key_ = Scanner::AllocatePrivateKey(result); | 5368 result.raw_ptr()->private_key_ = Scanner::AllocatePrivateKey(result); |
| 5369 result.raw_ptr()->dictionary_ = Array::Empty(); | 5369 result.raw_ptr()->dictionary_ = Array::Empty(); |
| 5370 result.raw_ptr()->anonymous_classes_ = Array::Empty(); | 5370 result.raw_ptr()->anonymous_classes_ = Array::Empty(); |
| 5371 result.raw_ptr()->num_anonymous_ = 0; | 5371 result.raw_ptr()->num_anonymous_ = 0; |
| 5372 result.raw_ptr()->imports_ = Array::Empty(); | 5372 result.raw_ptr()->imports_ = Array::Empty(); |
| 5373 result.raw_ptr()->loaded_scripts_ = Array::null(); | 5373 result.raw_ptr()->loaded_scripts_ = Array::null(); |
| 5374 result.set_native_entry_resolver(NULL); | 5374 result.set_native_entry_resolver(NULL); |
| 5375 result.raw_ptr()->corelib_imported_ = true; | 5375 result.raw_ptr()->corelib_imported_ = true; |
| 5376 result.set_debuggable(false); |
| 5376 result.raw_ptr()->load_state_ = RawLibrary::kAllocated; | 5377 result.raw_ptr()->load_state_ = RawLibrary::kAllocated; |
| 5377 result.raw_ptr()->index_ = -1; | 5378 result.raw_ptr()->index_ = -1; |
| 5378 result.InitClassDictionary(); | 5379 result.InitClassDictionary(); |
| 5379 result.InitImportList(); | 5380 result.InitImportList(); |
| 5380 result.InitImportedIntoList(); | 5381 result.InitImportedIntoList(); |
| 5381 if (import_core_lib) { | 5382 if (import_core_lib) { |
| 5382 Library& core_lib = Library::Handle(Library::CoreLibrary()); | 5383 Library& core_lib = Library::Handle(Library::CoreLibrary()); |
| 5383 ASSERT(!core_lib.IsNull()); | 5384 ASSERT(!core_lib.IsNull()); |
| 5384 result.AddImport(core_lib); | 5385 result.AddImport(core_lib); |
| 5385 } | 5386 } |
| (...skipping 4729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10115 const String& str = String::Handle(pattern()); | 10116 const String& str = String::Handle(pattern()); |
| 10116 const char* format = "JSRegExp: pattern=%s flags=%s"; | 10117 const char* format = "JSRegExp: pattern=%s flags=%s"; |
| 10117 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); | 10118 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); |
| 10118 char* chars = reinterpret_cast<char*>( | 10119 char* chars = reinterpret_cast<char*>( |
| 10119 Isolate::Current()->current_zone()->Allocate(len + 1)); | 10120 Isolate::Current()->current_zone()->Allocate(len + 1)); |
| 10120 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); | 10121 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); |
| 10121 return chars; | 10122 return chars; |
| 10122 } | 10123 } |
| 10123 | 10124 |
| 10124 } // namespace dart | 10125 } // namespace dart |
| OLD | NEW |