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

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

Issue 379353003: Implement Evaluate without creating new classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 years, 5 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/debugger_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 <limits> 8 #include <limits>
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 intptr_t token_pos); 1977 intptr_t token_pos);
1978 1978
1979 // Allocates a new Function object representing a closure function, as well as 1979 // Allocates a new Function object representing a closure function, as well as
1980 // a new associated Class object representing the signature class of the 1980 // a new associated Class object representing the signature class of the
1981 // function. 1981 // function.
1982 // The function and the class share the same given name. 1982 // The function and the class share the same given name.
1983 static RawFunction* NewClosureFunction(const String& name, 1983 static RawFunction* NewClosureFunction(const String& name,
1984 const Function& parent, 1984 const Function& parent,
1985 intptr_t token_pos); 1985 intptr_t token_pos);
1986 1986
1987 static RawFunction* NewEvalFunction(const Class& owner,
1988 const Script& script,
1989 bool is_static);
1990
1987 // Creates a new static initializer function which is invoked in the implicit 1991 // Creates a new static initializer function which is invoked in the implicit
1988 // static getter function. 1992 // static getter function.
1989 static RawFunction* NewStaticInitializer(const Field& field); 1993 static RawFunction* NewStaticInitializer(const Field& field);
1990 1994
1991 // Allocate new function object, clone values from this function. The 1995 // Allocate new function object, clone values from this function. The
1992 // owner of the clone is new_owner. 1996 // owner of the clone is new_owner.
1993 RawFunction* Clone(const Class& new_owner) const; 1997 RawFunction* Clone(const Class& new_owner) const;
1994 1998
1995 // Slow function, use in asserts to track changes in important library 1999 // Slow function, use in asserts to track changes in important library
1996 // functions. 2000 // functions.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
2051 void set_kind(RawFunction::Kind value) const; 2055 void set_kind(RawFunction::Kind value) const;
2052 void set_is_static(bool value) const; 2056 void set_is_static(bool value) const;
2053 void set_is_const(bool value) const; 2057 void set_is_const(bool value) const;
2054 void set_is_external(bool value) const; 2058 void set_is_external(bool value) const;
2055 void set_parent_function(const Function& value) const; 2059 void set_parent_function(const Function& value) const;
2056 void set_owner(const Object& value) const; 2060 void set_owner(const Object& value) const;
2057 RawFunction* implicit_closure_function() const; 2061 RawFunction* implicit_closure_function() const;
2058 void set_implicit_closure_function(const Function& value) const; 2062 void set_implicit_closure_function(const Function& value) const;
2059 RawInstance* implicit_static_closure() const; 2063 RawInstance* implicit_static_closure() const;
2060 void set_implicit_static_closure(const Instance& closure) const; 2064 void set_implicit_static_closure(const Instance& closure) const;
2065 RawScript* eval_script() const;
2066 void set_eval_script(const Script& value) const;
2061 void set_num_optional_parameters(intptr_t value) const; // Encoded value. 2067 void set_num_optional_parameters(intptr_t value) const; // Encoded value.
2062 void set_kind_tag(intptr_t value) const; 2068 void set_kind_tag(intptr_t value) const;
2063 void set_data(const Object& value) const; 2069 void set_data(const Object& value) const;
2064 bool is_optimizable() const { 2070 bool is_optimizable() const {
2065 return OptimizableBit::decode(raw_ptr()->kind_tag_); 2071 return OptimizableBit::decode(raw_ptr()->kind_tag_);
2066 } 2072 }
2067 void set_is_optimizable(bool value) const; 2073 void set_is_optimizable(bool value) const;
2068 2074
2069 static RawFunction* New(); 2075 static RawFunction* New();
2070 2076
(...skipping 5099 matching lines...) Expand 10 before | Expand all | Expand 10 after
7170 7176
7171 7177
7172 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7178 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7173 intptr_t index) { 7179 intptr_t index) {
7174 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7180 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7175 } 7181 }
7176 7182
7177 } // namespace dart 7183 } // namespace dart
7178 7184
7179 #endif // VM_OBJECT_H_ 7185 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/debugger_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698