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

Unified Diff: runtime/vm/flow_graph_compiler_arm.cc

Issue 17977002: - Remove arguments definition test from the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/flow_graph_compiler_arm.cc
===================================================================
--- runtime/vm/flow_graph_compiler_arm.cc (revision 24474)
+++ runtime/vm/flow_graph_compiler_arm.cc (working copy)
@@ -1061,8 +1061,6 @@
// the presence of optional parameters.
// 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.
- LocalVariable* saved_args_desc_var =
- parsed_function().GetSavedArgumentsDescriptorVar();
if (num_copied_params == 0) {
#ifdef DEBUG
ASSERT(!parsed_function().function().HasOptionalParameters());
@@ -1130,26 +1128,12 @@
}
__ Bind(&correct_num_arguments);
}
- // The arguments descriptor is never saved in the absence of optional
- // parameters, since any argument definition test would always yield true.
- ASSERT(saved_args_desc_var == NULL);
} else {
- if (saved_args_desc_var != NULL) {
- __ Comment("Save arguments descriptor");
- const Register kArgumentsDescriptorReg = R4;
- // The saved_args_desc_var is allocated one slot before the first local.
- const intptr_t slot = parsed_function().first_stack_local_index() + 1;
- // If the saved_args_desc_var is captured, it is first moved to the stack
- // and later to the context, once the context is allocated.
- ASSERT(saved_args_desc_var->is_captured() ||
- (saved_args_desc_var->index() == slot));
- __ str(kArgumentsDescriptorReg, Address(FP, slot * kWordSize));
- }
CopyParameters();
}
// In unoptimized code, initialize (non-argument) stack allocated slots to
- // null. This does not cover the saved_args_desc_var slot.
+ // null.
if (!is_optimizing() && (num_locals > 0)) {
__ Comment("Initialize spill slots");
const intptr_t slot_base = parsed_function().first_stack_local_index();

Powered by Google App Engine
This is Rietveld 408576698