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

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

Issue 14520010: First step towards loading the core library scripts directly from the sources (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/bootstrap_nocorelib.cc ('k') | runtime/vm/object.cc » ('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 #ifndef VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 900
901 // Assigns empty array to all raw class array fields. 901 // Assigns empty array to all raw class array fields.
902 void InitEmptyFields(); 902 void InitEmptyFields();
903 903
904 RawFunction* LookupAccessorFunction(const char* prefix, 904 RawFunction* LookupAccessorFunction(const char* prefix,
905 intptr_t prefix_length, 905 intptr_t prefix_length,
906 const String& name) const; 906 const String& name) const;
907 907
908 // Allocate an instance class which has a VM implementation. 908 // Allocate an instance class which has a VM implementation.
909 template <class FakeInstance> static RawClass* New(intptr_t id); 909 template <class FakeInstance> static RawClass* New(intptr_t id);
910 template <class FakeInstance> static RawClass* New(const String& name,
911 const Script& script,
912 intptr_t token_pos);
913 910
914 // Check the subtype or 'more specific' relationship. 911 // Check the subtype or 'more specific' relationship.
915 bool TypeTest(TypeTestKind test_kind, 912 bool TypeTest(TypeTestKind test_kind,
916 const AbstractTypeArguments& type_arguments, 913 const AbstractTypeArguments& type_arguments,
917 const Class& other, 914 const Class& other,
918 const AbstractTypeArguments& other_type_arguments, 915 const AbstractTypeArguments& other_type_arguments,
919 Error* malformed_error) const; 916 Error* malformed_error) const;
920 917
921 FINAL_HEAP_OBJECT_IMPLEMENTATION(Class, Object); 918 FINAL_HEAP_OBJECT_IMPLEMENTATION(Class, Object);
922 friend class AbstractType; 919 friend class AbstractType;
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2216 RawArray* dictionary() const { return raw_ptr()->dictionary_; } 2213 RawArray* dictionary() const { return raw_ptr()->dictionary_; }
2217 void InitClassDictionary() const; 2214 void InitClassDictionary() const;
2218 void InitImportList() const; 2215 void InitImportList() const;
2219 void GrowDictionary(const Array& dict, intptr_t dict_size) const; 2216 void GrowDictionary(const Array& dict, intptr_t dict_size) const;
2220 static RawLibrary* NewLibraryHelper(const String& url, 2217 static RawLibrary* NewLibraryHelper(const String& url,
2221 bool import_core_lib); 2218 bool import_core_lib);
2222 RawObject* LookupEntry(const String& name, intptr_t *index) const; 2219 RawObject* LookupEntry(const String& name, intptr_t *index) const;
2223 2220
2224 FINAL_HEAP_OBJECT_IMPLEMENTATION(Library, Object); 2221 FINAL_HEAP_OBJECT_IMPLEMENTATION(Library, Object);
2225 2222
2226 friend class Object; 2223 friend class Bootstrap;
2227 friend class Class; 2224 friend class Class;
2228 friend class Debugger; 2225 friend class Debugger;
2229 friend class DictionaryIterator; 2226 friend class DictionaryIterator;
2230 friend class Isolate; 2227 friend class Isolate;
2231 friend class Namespace; 2228 friend class Namespace;
2229 friend class Object;
2232 }; 2230 };
2233 2231
2234 2232
2235 class LibraryPrefix : public Object { 2233 class LibraryPrefix : public Object {
2236 public: 2234 public:
2237 RawString* name() const { return raw_ptr()->name_; } 2235 RawString* name() const { return raw_ptr()->name_; }
2238 virtual RawString* DictionaryName() const { return name(); } 2236 virtual RawString* DictionaryName() const { return name(); }
2239 2237
2240 RawArray* imports() const { return raw_ptr()->imports_; } 2238 RawArray* imports() const { return raw_ptr()->imports_; }
2241 intptr_t num_imports() const { return raw_ptr()->num_imports_; } 2239 intptr_t num_imports() const { return raw_ptr()->num_imports_; }
(...skipping 3469 matching lines...) Expand 10 before | Expand all | Expand 10 after
5711 5709
5712 5710
5713 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 5711 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
5714 intptr_t index) { 5712 intptr_t index) {
5715 return array.At((index * kEntryLength) + kTargetFunctionIndex); 5713 return array.At((index * kEntryLength) + kTargetFunctionIndex);
5716 } 5714 }
5717 5715
5718 } // namespace dart 5716 } // namespace dart
5719 5717
5720 #endif // VM_OBJECT_H_ 5718 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_nocorelib.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698