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

Unified Diff: runtime/vm/kernel_binary_flowgraph.h

Issue 2891053003: Add support for converted closures with explicit contexts to VM (Closed)
Patch Set: Return statement-to-block conversion for procedure bodies Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/kernel_binary_flowgraph.h
diff --git a/runtime/vm/kernel_binary_flowgraph.h b/runtime/vm/kernel_binary_flowgraph.h
index 4667e5152d1be8c4b134e8e9b40f62340486f9a3..f07cc8d8a7dd26b5f13defae166642c679b249bd 100644
--- a/runtime/vm/kernel_binary_flowgraph.h
+++ b/runtime/vm/kernel_binary_flowgraph.h
@@ -119,6 +119,7 @@ class StreamingScopeBuilder {
void VisitInterfaceType(bool simple);
void VisitFunctionType(bool simple);
void VisitTypeParameterType();
+ void VisitVectorType();
void HandleLocalFunction(intptr_t parent_kernel_offset);
void EnterScope(intptr_t kernel_offset);
@@ -383,6 +384,7 @@ class StreamingFlowGraphBuilder {
Fragment BuildFieldInitializer(NameIndex canonical_name);
Fragment BuildInitializers(intptr_t constructor_class_parent_offset);
FlowGraph* BuildGraphOfImplicitClosureFunction(const Function& function);
+ FlowGraph* BuildGraphOfConvertedClosureFunction(const Function& function);
FlowGraph* BuildGraphOfFunction(
bool is_in_builtin_library_toplevel,
intptr_t constructor_class_parent_offset = -1);
@@ -449,6 +451,7 @@ class StreamingFlowGraphBuilder {
BreakableBlock* breakable_block();
GrowableArray<YieldContinuation>& yield_continuations();
Value* stack();
+ void Push(Definition* definition);
Value* Pop();
Tag PeekArgumentsFirstPositionalTag();
@@ -501,8 +504,13 @@ class StreamingFlowGraphBuilder {
const TypeArguments& type_arguments);
Fragment StrictCompare(Token::Kind kind, bool number_check = false);
Fragment AllocateObject(const dart::Class& klass, intptr_t argument_count);
+ Fragment AllocateObject(const dart::Class& klass,
+ const Function& closure_function);
+ Fragment LoadField(intptr_t offset);
+ Fragment AllocateContext(int size);
kustermann 2017/06/20 12:13:14 s/int/intptr_t/ Although it makes little differen
Dmitry Stefantsov 2017/06/22 14:12:52 I agree that using `intptr_t` here is more aligned
Fragment StoreLocal(TokenPosition position, LocalVariable* variable);
Fragment StoreStaticField(TokenPosition position, const dart::Field& field);
+ Fragment StoreInstanceField(TokenPosition position, intptr_t offset);
Fragment StringInterpolate(TokenPosition position);
Fragment StringInterpolateSingle(TokenPosition position);
Fragment ThrowTypeError();
@@ -590,6 +598,11 @@ class StreamingFlowGraphBuilder {
Fragment BuildDoubleLiteral(TokenPosition* position);
Fragment BuildBoolLiteral(bool value, TokenPosition* position);
Fragment BuildNullLiteral(TokenPosition* position);
+ Fragment BuildVectorCreation(TokenPosition* position);
+ Fragment BuildVectorGet(TokenPosition* position);
+ Fragment BuildVectorSet(TokenPosition* position);
+ Fragment BuildVectorCopy(TokenPosition* position);
+ Fragment BuildClosureCreation(TokenPosition* position);
Fragment BuildInvalidStatement();
Fragment BuildExpressionStatement();

Powered by Google App Engine
This is Rietveld 408576698