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

Unified Diff: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart

Issue 2479323003: Adding check or trust type checks to builder_kernel.dart. (Closed)
Patch Set: .. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/graph_builder.dart ('k') | pkg/compiler/lib/src/ssa/type_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
diff --git a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
index 35ee5275c819bff665274e2dcc01b321e442e492..a5578f172abd38575f291e90598c164382b75b46 100644
--- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
@@ -250,6 +250,8 @@ class KernelAstAdapter {
return _backend.isInterceptedSelector(selector);
}
+ LibraryElement get jsHelperLibrary => _backend.helpers.jsHelperLibrary;
+
JumpTarget getTargetDefinition(ir.Node node) =>
elements.getTargetDefinition(getNode(node));
@@ -293,9 +295,13 @@ class KernelAstAdapter {
return types.map(getDartType).toList();
}
+ DartType getFunctionReturnType(ir.FunctionNode node) {
+ return getDartType(node.returnType);
+ }
+
/// Computes the function type corresponding the signature of [node].
FunctionType getFunctionType(ir.FunctionNode node) {
- DartType returnType = getDartType(node.returnType);
+ DartType returnType = getFunctionReturnType(node);
List<DartType> parameterTypes = <DartType>[];
List<DartType> optionalParameterTypes = <DartType>[];
for (ir.VariableDeclaration variable in node.positionalParameters) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/graph_builder.dart ('k') | pkg/compiler/lib/src/ssa/type_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698