Chromium Code Reviews| Index: runtime/vm/kernel_to_il.cc |
| diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc |
| index a315410cbc799b1997a922536404e94a65a05944..d83f90ea4bfe14cdae97f7f04296c2a629c6156f 100644 |
| --- a/runtime/vm/kernel_to_il.cc |
| +++ b/runtime/vm/kernel_to_il.cc |
| @@ -794,9 +794,14 @@ Fragment FlowGraphBuilder::LoadInstantiatorTypeArguments() { |
| return instructions; |
| } |
| +// KERNEL_GENERIC_METHODS_UNDONE(sjindel): This seems to work for static |
|
jensj
2017/08/11 06:24:55
todo?
sjindel
2017/08/14 11:05:49
Done.
|
| +// top-level functions, but probably needs to be revisited when generic methods |
| +// are fully supported in kernel. |
| Fragment FlowGraphBuilder::LoadFunctionTypeArguments() { |
| - UNIMPLEMENTED(); // TODO(regis) |
| - return Fragment(NULL); |
| + Fragment instructions; |
| + ASSERT(parsed_function_->function_type_arguments() != NULL); |
| + instructions += LoadLocal(parsed_function_->function_type_arguments()); |
| + return instructions; |
| } |
| Fragment FlowGraphBuilder::InstantiateType(const AbstractType& type) { |
| @@ -1286,11 +1291,11 @@ static intptr_t GetResultCidOfListFactory(Zone* zone, |
| Fragment FlowGraphBuilder::StaticCall(TokenPosition position, |
| const Function& target, |
| intptr_t argument_count, |
| - const Array& argument_names) { |
| + const Array& argument_names, |
| + intptr_t type_args_count) { |
| ArgumentArray arguments = GetArguments(argument_count); |
| - const intptr_t kTypeArgsLen = 0; // Generic static calls not yet supported. |
| StaticCallInstr* call = |
| - new (Z) StaticCallInstr(position, target, kTypeArgsLen, argument_names, |
| + new (Z) StaticCallInstr(position, target, type_args_count, argument_names, |
| arguments, ic_data_array_, GetNextDeoptId()); |
| const intptr_t list_cid = |
| GetResultCidOfListFactory(Z, target, argument_count); |
| @@ -1571,6 +1576,14 @@ Value* FlowGraphBuilder::Pop() { |
| return value; |
| } |
| +intptr_t FlowGraphBuilder::StackDepth() { |
|
jensj
2017/08/11 06:24:55
I don't think this method is actually used.
sjindel
2017/08/11 09:21:06
It's not -- I found it useful for debugging, so I
jensj
2017/08/14 06:47:13
While that's fine for developing, I don't think we
sjindel
2017/08/14 11:05:50
Done.
|
| + intptr_t depth = 0; |
| + for (Value* value = stack_; value; value = value->next_use()) { |
| + ++depth; |
| + } |
| + return depth; |
| +} |
| + |
| Fragment FlowGraphBuilder::Drop() { |
| ASSERT(stack_ != NULL); |
| Fragment instructions; |