Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: runtime/vm/object.cc

Issue 22642003: Fix name of libraries without a library declaration to be the empty string. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/cpu.h" 10 #include "vm/cpu.h"
(...skipping 7047 matching lines...) Expand 10 before | Expand all | Expand 10 after
7058 RawObject* raw = Object::Allocate(Library::kClassId, 7058 RawObject* raw = Object::Allocate(Library::kClassId,
7059 Library::InstanceSize(), 7059 Library::InstanceSize(),
7060 Heap::kOld); 7060 Heap::kOld);
7061 return reinterpret_cast<RawLibrary*>(raw); 7061 return reinterpret_cast<RawLibrary*>(raw);
7062 } 7062 }
7063 7063
7064 7064
7065 RawLibrary* Library::NewLibraryHelper(const String& url, 7065 RawLibrary* Library::NewLibraryHelper(const String& url,
7066 bool import_core_lib) { 7066 bool import_core_lib) {
7067 const Library& result = Library::Handle(Library::New()); 7067 const Library& result = Library::Handle(Library::New());
7068 result.StorePointer(&result.raw_ptr()->name_, url.raw()); 7068 result.StorePointer(&result.raw_ptr()->name_, Symbols::Empty().raw());
7069 result.StorePointer(&result.raw_ptr()->url_, url.raw()); 7069 result.StorePointer(&result.raw_ptr()->url_, url.raw());
7070 result.raw_ptr()->private_key_ = Scanner::AllocatePrivateKey(result); 7070 result.raw_ptr()->private_key_ = Scanner::AllocatePrivateKey(result);
7071 result.raw_ptr()->dictionary_ = Object::empty_array().raw(); 7071 result.raw_ptr()->dictionary_ = Object::empty_array().raw();
7072 result.StorePointer(&result.raw_ptr()->metadata_, 7072 result.StorePointer(&result.raw_ptr()->metadata_,
7073 GrowableObjectArray::New(4, Heap::kOld)); 7073 GrowableObjectArray::New(4, Heap::kOld));
7074 result.raw_ptr()->anonymous_classes_ = Object::empty_array().raw(); 7074 result.raw_ptr()->anonymous_classes_ = Object::empty_array().raw();
7075 result.raw_ptr()->num_anonymous_ = 0; 7075 result.raw_ptr()->num_anonymous_ = 0;
7076 result.raw_ptr()->imports_ = Object::empty_array().raw(); 7076 result.raw_ptr()->imports_ = Object::empty_array().raw();
7077 result.raw_ptr()->exports_ = Object::empty_array().raw(); 7077 result.raw_ptr()->exports_ = Object::empty_array().raw();
7078 result.raw_ptr()->loaded_scripts_ = Array::null(); 7078 result.raw_ptr()->loaded_scripts_ = Array::null();
(...skipping 7507 matching lines...) Expand 10 before | Expand all | Expand 10 after
14586 } 14586 }
14587 14587
14588 14588
14589 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 14589 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
14590 stream->OpenObject(); 14590 stream->OpenObject();
14591 stream->CloseObject(); 14591 stream->CloseObject();
14592 } 14592 }
14593 14593
14594 14594
14595 } // namespace dart 14595 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698