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

Unified Diff: runtime/vm/kernel_binary_flowgraph.h

Issue 2973633002: [kernel] Change how TypeParameterType is calculated. (Closed)
Patch Set: longjmp instead of UNREACHABLE (+ rebase) Created 3 years, 4 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
« no previous file with comments | « pkg/kernel/lib/binary/ast_to_binary.dart ('k') | runtime/vm/kernel_binary_flowgraph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_binary_flowgraph.h
diff --git a/runtime/vm/kernel_binary_flowgraph.h b/runtime/vm/kernel_binary_flowgraph.h
index bf5e4e64e5544c7159d1511f633a07787b1dd68b..1b000abaa4f16fac1ead9f0c0db18e375a377864 100644
--- a/runtime/vm/kernel_binary_flowgraph.h
+++ b/runtime/vm/kernel_binary_flowgraph.h
@@ -57,6 +57,11 @@ class StreamingDartTypeTranslator {
parameters_count_(parameters_count),
outer_(translator->type_parameter_scope_),
translator_(translator) {
+ outer_parameter_count_ = 0;
+ if (outer_ != NULL) {
+ outer_parameter_count_ =
+ outer_->outer_parameter_count_ + outer_->parameters_count_;
+ }
translator_->type_parameter_scope_ = this;
}
~TypeParameterScope() { translator_->type_parameter_scope_ = outer_; }
@@ -64,10 +69,12 @@ class StreamingDartTypeTranslator {
TypeParameterScope* outer() const { return outer_; }
intptr_t parameters_offset() const { return parameters_offset_; }
intptr_t parameters_count() const { return parameters_count_; }
+ intptr_t outer_parameter_count() const { return outer_parameter_count_; }
private:
intptr_t parameters_offset_;
intptr_t parameters_count_;
+ intptr_t outer_parameter_count_;
TypeParameterScope* outer_;
StreamingDartTypeTranslator* translator_;
};
@@ -346,20 +353,8 @@ class StreamingFlowGraphBuilder {
private:
void DiscoverEnclosingElements(Zone* zone,
const Function& function,
- Function* outermost_function,
- intptr_t* outermost_kernel_offset,
- intptr_t* parent_class_offset);
- intptr_t GetParentOffset(intptr_t offset);
- void GetTypeParameterInfoForClass(intptr_t class_offset,
- intptr_t* type_paremeter_counts,
- intptr_t* type_paremeter_offset);
-
- void GetTypeParameterInfoForPossibleProcedure(
- intptr_t outermost_kernel_offset,
- bool* member_is_procedure,
- bool* is_factory_procedure,
- intptr_t* member_type_parameters,
- intptr_t* member_type_parameters_offset_start);
+ Function* outermost_function);
+
/**
* Will return kernel offset for parent class if reading a constructor.
* Will otherwise return -1.
« no previous file with comments | « pkg/kernel/lib/binary/ast_to_binary.dart ('k') | runtime/vm/kernel_binary_flowgraph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698