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

Unified Diff: runtime/vm/flow_graph_compiler_x64.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
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
===================================================================
--- runtime/vm/flow_graph_compiler_x64.cc (revision 24537)
+++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
@@ -1113,8 +1113,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());
@@ -1158,26 +1156,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 (!flow_graph().IsCompiledForOsr()) {
- if (saved_args_desc_var != NULL) {
- __ Comment("Save arguments descriptor");
- const Register kArgumentsDescriptorReg = R10;
- // 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));
- __ movq(Address(RBP, slot * kWordSize), kArgumentsDescriptorReg);
- }
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();
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698