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

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

Issue 944893005: Implement async* functions in VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/parser.h » ('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 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2167 2167
2168 bool IsSyncGenerator() const { 2168 bool IsSyncGenerator() const {
2169 return modifier() == RawFunction::kSyncGen; 2169 return modifier() == RawFunction::kSyncGen;
2170 } 2170 }
2171 2171
2172 bool IsSyncGenClosure() const { 2172 bool IsSyncGenClosure() const {
2173 return is_generated_body() && 2173 return is_generated_body() &&
2174 Function::Handle(parent_function()).IsSyncGenerator(); 2174 Function::Handle(parent_function()).IsSyncGenerator();
2175 } 2175 }
2176 2176
2177 bool IsGeneratorClosure() const {
2178 return is_generated_body() &&
2179 Function::Handle(parent_function()).IsGenerator();
2180 }
2181
2182 bool IsAsyncGenerator() const {
2183 return modifier() == RawFunction::kAsyncGen;
2184 }
2185
2186 bool IsAsyncGenClosure() const {
2187 return is_generated_body() &&
2188 Function::Handle(parent_function()).IsAsyncGenerator();
2189 }
2190
2177 bool IsAsyncOrGenerator() const { 2191 bool IsAsyncOrGenerator() const {
2178 return modifier() != RawFunction::kNoModifier; 2192 return modifier() != RawFunction::kNoModifier;
2179 } 2193 }
2180 2194
2181 static intptr_t InstanceSize() { 2195 static intptr_t InstanceSize() {
2182 return RoundedAllocationSize(sizeof(RawFunction)); 2196 return RoundedAllocationSize(sizeof(RawFunction));
2183 } 2197 }
2184 2198
2185 static RawFunction* New(const String& name, 2199 static RawFunction* New(const String& name,
2186 RawFunction::Kind kind, 2200 RawFunction::Kind kind,
(...skipping 5624 matching lines...) Expand 10 before | Expand all | Expand 10 after
7811 7825
7812 7826
7813 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7827 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7814 intptr_t index) { 7828 intptr_t index) {
7815 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7829 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7816 } 7830 }
7817 7831
7818 } // namespace dart 7832 } // namespace dart
7819 7833
7820 #endif // VM_OBJECT_H_ 7834 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698