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

Unified Diff: runtime/vm/flow_graph_compiler_arm64.cc

Issue 3000333002: Fix several bugs in closure conversion. (Closed)
Patch Set: Comments. 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 | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_arm64.cc
diff --git a/runtime/vm/flow_graph_compiler_arm64.cc b/runtime/vm/flow_graph_compiler_arm64.cc
index d3fe2747147aa549bf894f8f2734b7daec6bdae2..1995c9b49da723dbaa4f1c25aa4a0e874b2657db 100644
--- a/runtime/vm/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/flow_graph_compiler_arm64.cc
@@ -750,7 +750,8 @@ void FlowGraphCompiler::CopyParameters() {
#ifdef DEBUG
const bool check_correct_named_args = true;
#else
- const bool check_correct_named_args = function.IsClosureFunction();
+ const bool check_correct_named_args =
+ function.IsClosureFunction() || function.IsConvertedClosureFunction();
#endif
if (num_opt_named_params > 0) {
// Start by alphabetically sorting the names of the optional parameters.
@@ -857,7 +858,7 @@ void FlowGraphCompiler::CopyParameters() {
}
__ Bind(&wrong_num_arguments);
- if (function.IsClosureFunction()) {
+ if (function.IsClosureFunction() || function.IsConvertedClosureFunction()) {
__ LeaveDartFrame(kKeepCalleePP); // The arguments are still on the stack.
__ BranchPatchable(*StubCode::CallClosureNoSuchMethod_entry());
// The noSuchMethod call may return to the caller, but not here.
@@ -987,8 +988,9 @@ void FlowGraphCompiler::CompileGraph() {
// No such checking code is generated if only fixed parameters are declared,
// unless we are in debug mode or unless we are compiling a closure.
if (num_copied_params == 0) {
- const bool check_arguments =
- function.IsClosureFunction() && !flow_graph().IsCompiledForOsr();
+ const bool check_arguments = (function.IsClosureFunction() ||
+ function.IsConvertedClosureFunction()) &&
+ !flow_graph().IsCompiledForOsr();
if (check_arguments) {
__ Comment("Check argument count");
// Check that exactly num_fixed arguments are passed in.
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698