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

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

Issue 8440014: Two-phase constructors (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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) 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 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 intptr_t token_index); 1282 intptr_t token_index);
1283 1283
1284 // Allocates a new Function object representing a closure function, as well as 1284 // Allocates a new Function object representing a closure function, as well as
1285 // a new associated Class object representing the signature class of the 1285 // a new associated Class object representing the signature class of the
1286 // function. 1286 // function.
1287 // The function and the class share the same given name. 1287 // The function and the class share the same given name.
1288 static RawFunction* NewClosureFunction(const String& name, 1288 static RawFunction* NewClosureFunction(const String& name,
1289 const Function& parent, 1289 const Function& parent,
1290 intptr_t token_index); 1290 intptr_t token_index);
1291 1291
1292 static const int kCtorPhaseInit = 1 << 0;
1293 static const int kCtorPhaseBody = 1 << 1;
1294 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody);
1295
1292 private: 1296 private:
1293 void set_name(const String& value) const; 1297 void set_name(const String& value) const;
1294 void set_kind(RawFunction::Kind value) const; 1298 void set_kind(RawFunction::Kind value) const;
1295 void set_is_static(bool is_static) const; 1299 void set_is_static(bool is_static) const;
1296 void set_is_const(bool is_const) const; 1300 void set_is_const(bool is_const) const;
1297 void set_parent_function(const Function& value) const; 1301 void set_parent_function(const Function& value) const;
1298 void set_token_index(intptr_t value) const; 1302 void set_token_index(intptr_t value) const;
1299 void set_implicit_closure_function(const Function& value) const; 1303 void set_implicit_closure_function(const Function& value) const;
1300 static RawFunction* New(); 1304 static RawFunction* New();
1301 1305
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after
2989 } 2993 }
2990 2994
2991 2995
2992 void Context::SetAt(intptr_t index, const Instance& value) const { 2996 void Context::SetAt(intptr_t index, const Instance& value) const {
2993 StorePointer(InstanceAddr(index), value.raw()); 2997 StorePointer(InstanceAddr(index), value.raw());
2994 } 2998 }
2995 2999
2996 } // namespace dart 3000 } // namespace dart
2997 3001
2998 #endif // VM_OBJECT_H_ 3002 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/parser.h » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698