| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "vm/assert.h" | 8 #include "vm/assert.h" |
| 9 #include "vm/dart.h" | 9 #include "vm/dart.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 intptr_t token_index); | 1276 intptr_t token_index); |
| 1277 | 1277 |
| 1278 // Allocates a new Function object representing a closure function, as well as | 1278 // Allocates a new Function object representing a closure function, as well as |
| 1279 // a new associated Class object representing the signature class of the | 1279 // a new associated Class object representing the signature class of the |
| 1280 // function. | 1280 // function. |
| 1281 // The function and the class share the same given name. | 1281 // The function and the class share the same given name. |
| 1282 static RawFunction* NewClosureFunction(const String& name, | 1282 static RawFunction* NewClosureFunction(const String& name, |
| 1283 const Function& parent, | 1283 const Function& parent, |
| 1284 intptr_t token_index); | 1284 intptr_t token_index); |
| 1285 | 1285 |
| 1286 static const int kCtorPhaseInit = 1 << 0; |
| 1287 static const int kCtorPhaseBody = 1 << 1; |
| 1288 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody); |
| 1289 |
| 1286 private: | 1290 private: |
| 1287 void set_name(const String& value) const; | 1291 void set_name(const String& value) const; |
| 1288 void set_kind(RawFunction::Kind value) const; | 1292 void set_kind(RawFunction::Kind value) const; |
| 1289 void set_is_static(bool is_static) const; | 1293 void set_is_static(bool is_static) const; |
| 1290 void set_is_const(bool is_const) const; | 1294 void set_is_const(bool is_const) const; |
| 1291 void set_parent_function(const Function& value) const; | 1295 void set_parent_function(const Function& value) const; |
| 1292 void set_token_index(intptr_t value) const; | 1296 void set_token_index(intptr_t value) const; |
| 1293 void set_implicit_closure_function(const Function& value) const; | 1297 void set_implicit_closure_function(const Function& value) const; |
| 1294 static RawFunction* New(); | 1298 static RawFunction* New(); |
| 1295 | 1299 |
| (...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2983 } | 2987 } |
| 2984 | 2988 |
| 2985 | 2989 |
| 2986 void Context::SetAt(intptr_t index, const Instance& value) const { | 2990 void Context::SetAt(intptr_t index, const Instance& value) const { |
| 2987 StorePointer(InstanceAddr(index), value.raw()); | 2991 StorePointer(InstanceAddr(index), value.raw()); |
| 2988 } | 2992 } |
| 2989 | 2993 |
| 2990 } // namespace dart | 2994 } // namespace dart |
| 2991 | 2995 |
| 2992 #endif // VM_OBJECT_H_ | 2996 #endif // VM_OBJECT_H_ |
| OLD | NEW |