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

Side by Side Diff: vm/object.h

Issue 9616044: Adds new apis Dart_GetField/Dart_SetField. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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
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 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 1740
1741 static RawLibrary* New(const String& url); 1741 static RawLibrary* New(const String& url);
1742 1742
1743 // Library scope name dictionary. 1743 // Library scope name dictionary.
1744 void AddClass(const Class& cls) const; 1744 void AddClass(const Class& cls) const;
1745 void AddObject(const Object& obj, const String& name) const; 1745 void AddObject(const Object& obj, const String& name) const;
1746 RawObject* LookupObject(const String& name) const; 1746 RawObject* LookupObject(const String& name) const;
1747 RawClass* LookupClass(const String& name) const; 1747 RawClass* LookupClass(const String& name) const;
1748 RawObject* LookupLocalObject(const String& name) const; 1748 RawObject* LookupLocalObject(const String& name) const;
1749 RawClass* LookupLocalClass(const String& name) const; 1749 RawClass* LookupLocalClass(const String& name) const;
1750 RawField* LookupLocalField(const String& name) const;
1751 RawFunction* LookupLocalFunction(const String& name) const;
1750 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const; 1752 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const;
1751 RawScript* LookupScript(const String& url) const; 1753 RawScript* LookupScript(const String& url) const;
1752 RawArray* LoadedScripts() const; 1754 RawArray* LoadedScripts() const;
1753 1755
1754 void AddAnonymousClass(const Class& cls) const; 1756 void AddAnonymousClass(const Class& cls) const;
1755 1757
1756 // Library imports. 1758 // Library imports.
1757 RawString* LookupImportMap(const String& name) const; 1759 RawString* LookupImportMap(const String& name) const;
1758 void AddImport(const Library& library) const; 1760 void AddImport(const Library& library) const;
1759 RawLibrary* LookupImport(const String& url) const; 1761 RawLibrary* LookupImport(const String& url) const;
1760 1762
1761 RawFunction* LookupFunctionInSource(const String& script_url, 1763 RawFunction* LookupFunctionInSource(const String& script_url,
1762 intptr_t line_number) const; 1764 intptr_t line_number) const;
1763 RawFunction* LookupFunctionInScript(const Script& script, 1765 RawFunction* LookupFunctionInScript(const Script& script,
1764 intptr_t token_index) const; 1766 intptr_t token_index) const;
1765 1767
1766 // Resolving native methods for script loaded in the library. 1768 // Resolving native methods for script loaded in the library.
1767 Dart_NativeEntryResolver native_entry_resolver() const { 1769 Dart_NativeEntryResolver native_entry_resolver() const {
1768 return raw_ptr()->native_entry_resolver_; 1770 return raw_ptr()->native_entry_resolver_;
1769 } 1771 }
1770 void set_native_entry_resolver(Dart_NativeEntryResolver value) const { 1772 void set_native_entry_resolver(Dart_NativeEntryResolver value) const {
1771 raw_ptr()->native_entry_resolver_ = value; 1773 raw_ptr()->native_entry_resolver_ = value;
1772 } 1774 }
1773 1775
1774 RawString* PrivateName(const char* name); 1776 RawString* PrivateName(const String& name) const;
1775 1777
1776 void Register() const; 1778 void Register() const;
1777 1779
1778 RawLibrary* next_registered() const { return raw_ptr()->next_registered_; } 1780 RawLibrary* next_registered() const { return raw_ptr()->next_registered_; }
1779 1781
1780 RawString* DuplicateDefineErrorString(const String& entry_name, 1782 RawString* DuplicateDefineErrorString(const String& entry_name,
1781 const Library& conflicting_lib) const; 1783 const Library& conflicting_lib) const;
1782 static RawLibrary* LookupLibrary(const String& url); 1784 static RawLibrary* LookupLibrary(const String& url);
1783 static RawString* CheckForDuplicateDefinition(); 1785 static RawString* CheckForDuplicateDefinition();
1784 static bool IsKeyUsed(intptr_t key); 1786 static bool IsKeyUsed(intptr_t key);
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after
3806 } 3808 }
3807 3809
3808 3810
3809 void Context::SetAt(intptr_t index, const Instance& value) const { 3811 void Context::SetAt(intptr_t index, const Instance& value) const {
3810 StorePointer(InstanceAddr(index), value.raw()); 3812 StorePointer(InstanceAddr(index), value.raw());
3811 } 3813 }
3812 3814
3813 } // namespace dart 3815 } // namespace dart
3814 3816
3815 #endif // VM_OBJECT_H_ 3817 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698