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

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

Issue 10824209: - Allow patching of top-level methods and accessors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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') | 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 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 1956
1957 static RawLibrary* New(const String& url); 1957 static RawLibrary* New(const String& url);
1958 1958
1959 // Library scope name dictionary. 1959 // Library scope name dictionary.
1960 // 1960 //
1961 // TODO(turnidge): The Lookup functions are not consistent in how 1961 // TODO(turnidge): The Lookup functions are not consistent in how
1962 // they deal with private names. Go through and make them a bit 1962 // they deal with private names. Go through and make them a bit
1963 // more regular. 1963 // more regular.
1964 void AddClass(const Class& cls) const; 1964 void AddClass(const Class& cls) const;
1965 void AddObject(const Object& obj, const String& name) const; 1965 void AddObject(const Object& obj, const String& name) const;
1966 void ReplaceObject(const Object& obj, const String& name) const;
1966 RawObject* LookupObject(const String& name) const; 1967 RawObject* LookupObject(const String& name) const;
1967 RawClass* LookupClass(const String& name) const; 1968 RawClass* LookupClass(const String& name) const;
1968 RawClass* LookupClassAllowPrivate(const String& name) const; 1969 RawClass* LookupClassAllowPrivate(const String& name) const;
1969 RawObject* LookupLocalObject(const String& name) const; 1970 RawObject* LookupLocalObject(const String& name) const;
1970 RawClass* LookupLocalClass(const String& name) const; 1971 RawClass* LookupLocalClass(const String& name) const;
1971 RawField* LookupFieldAllowPrivate(const String& name) const; 1972 RawField* LookupFieldAllowPrivate(const String& name) const;
1972 RawField* LookupLocalField(const String& name) const; 1973 RawField* LookupLocalField(const String& name) const;
1973 RawFunction* LookupFunctionAllowPrivate(const String& name) const; 1974 RawFunction* LookupFunctionAllowPrivate(const String& name) const;
1974 RawFunction* LookupLocalFunction(const String& name) const; 1975 RawFunction* LookupLocalFunction(const String& name) const;
1975 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const; 1976 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const;
(...skipping 15 matching lines...) Expand all
1991 intptr_t token_pos) const; 1992 intptr_t token_pos) const;
1992 1993
1993 // Resolving native methods for script loaded in the library. 1994 // Resolving native methods for script loaded in the library.
1994 Dart_NativeEntryResolver native_entry_resolver() const { 1995 Dart_NativeEntryResolver native_entry_resolver() const {
1995 return raw_ptr()->native_entry_resolver_; 1996 return raw_ptr()->native_entry_resolver_;
1996 } 1997 }
1997 void set_native_entry_resolver(Dart_NativeEntryResolver value) const { 1998 void set_native_entry_resolver(Dart_NativeEntryResolver value) const {
1998 raw_ptr()->native_entry_resolver_ = value; 1999 raw_ptr()->native_entry_resolver_ = value;
1999 } 2000 }
2000 2001
2002 RawError* Patch(const String& url, const String& source) const;
2003
2001 RawString* PrivateName(const String& name) const; 2004 RawString* PrivateName(const String& name) const;
2002 2005
2003 intptr_t index() const { return raw_ptr()->index_; } 2006 intptr_t index() const { return raw_ptr()->index_; }
2004 void set_index(intptr_t value) const { 2007 void set_index(intptr_t value) const {
2005 raw_ptr()->index_ = value; 2008 raw_ptr()->index_ = value;
2006 } 2009 }
2007 2010
2008 void Register() const; 2011 void Register() const;
2009 2012
2010 bool IsDebuggable() const { 2013 bool IsDebuggable() const {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 RawArray* imported_into() const { return raw_ptr()->imported_into_; } 2057 RawArray* imported_into() const { return raw_ptr()->imported_into_; }
2055 RawArray* loaded_scripts() const { return raw_ptr()->loaded_scripts_; } 2058 RawArray* loaded_scripts() const { return raw_ptr()->loaded_scripts_; }
2056 RawArray* dictionary() const { return raw_ptr()->dictionary_; } 2059 RawArray* dictionary() const { return raw_ptr()->dictionary_; }
2057 void InitClassDictionary() const; 2060 void InitClassDictionary() const;
2058 void InitImportList() const; 2061 void InitImportList() const;
2059 void InitImportedIntoList() const; 2062 void InitImportedIntoList() const;
2060 void GrowDictionary(const Array& dict, intptr_t dict_size) const; 2063 void GrowDictionary(const Array& dict, intptr_t dict_size) const;
2061 static RawLibrary* NewLibraryHelper(const String& url, 2064 static RawLibrary* NewLibraryHelper(const String& url,
2062 bool import_core_lib); 2065 bool import_core_lib);
2063 void AddImportedInto(const Library& library) const; 2066 void AddImportedInto(const Library& library) const;
2067 RawObject* LookupEntry(const String& name, intptr_t *index) const;
2064 RawObject* LookupObjectFiltered(const String& name, 2068 RawObject* LookupObjectFiltered(const String& name,
2065 const Library& filter_lib) const; 2069 const Library& filter_lib) const;
2066 RawLibrary* LookupObjectInImporter(const String& name) const; 2070 RawLibrary* LookupObjectInImporter(const String& name) const;
2067 RawString* FindDuplicateDefinition() const; 2071 RawString* FindDuplicateDefinition() const;
2068 2072
2069 HEAP_OBJECT_IMPLEMENTATION(Library, Object); 2073 HEAP_OBJECT_IMPLEMENTATION(Library, Object);
2070 friend class Class; 2074 friend class Class;
2071 friend class Debugger; 2075 friend class Debugger;
2072 friend class DictionaryIterator; 2076 friend class DictionaryIterator;
2073 friend class Isolate; 2077 friend class Isolate;
(...skipping 3377 matching lines...) Expand 10 before | Expand all | Expand 10 after
5451 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 5455 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
5452 return false; 5456 return false;
5453 } 5457 }
5454 } 5458 }
5455 return true; 5459 return true;
5456 } 5460 }
5457 5461
5458 } // namespace dart 5462 } // namespace dart
5459 5463
5460 #endif // VM_OBJECT_H_ 5464 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698