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

Side by Side Diff: src/compiler.cc

Issue 6591042: When checking number of parameters in MakeCrankshaft code don't forget about receiver. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-1209.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // True indicates the compilation pipeline is still going, not 214 // True indicates the compilation pipeline is still going, not
215 // necessarily that we optimized the code. 215 // necessarily that we optimized the code.
216 return true; 216 return true;
217 } 217 }
218 218
219 // Due to an encoding limit on LUnallocated operands in the Lithium 219 // Due to an encoding limit on LUnallocated operands in the Lithium
220 // language, we cannot optimize functions with too many formal parameters 220 // language, we cannot optimize functions with too many formal parameters
221 // or perform on-stack replacement for function with too many 221 // or perform on-stack replacement for function with too many
222 // stack-allocated local variables. 222 // stack-allocated local variables.
223 // 223 //
224 // The encoding is as a signed value, with parameters using the negative 224 // The encoding is as a signed value, with parameters and receiver using
225 // indices and locals the non-negative ones. 225 // the negative indices and locals the non-negative ones.
226 const int limit = LUnallocated::kMaxFixedIndices / 2; 226 const int limit = LUnallocated::kMaxFixedIndices / 2;
227 Scope* scope = info->scope(); 227 Scope* scope = info->scope();
228 if (scope->num_parameters() > limit || scope->num_stack_slots() > limit) { 228 if ((scope->num_parameters() + 1) > limit ||
229 scope->num_stack_slots() > limit) {
229 AbortAndDisable(info); 230 AbortAndDisable(info);
230 // True indicates the compilation pipeline is still going, not 231 // True indicates the compilation pipeline is still going, not
231 // necessarily that we optimized the code. 232 // necessarily that we optimized the code.
232 return true; 233 return true;
233 } 234 }
234 235
235 // Take --hydrogen-filter into account. 236 // Take --hydrogen-filter into account.
236 Vector<const char> filter = CStrVector(FLAG_hydrogen_filter); 237 Vector<const char> filter = CStrVector(FLAG_hydrogen_filter);
237 Handle<String> name = info->function()->debug_name(); 238 Handle<String> name = info->function()->debug_name();
238 bool match = filter.is_empty() || name->IsEqualTo(filter); 239 bool match = filter.is_empty() || name->IsEqualTo(filter);
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 shared->DebugName())); 797 shared->DebugName()));
797 } 798 }
798 } 799 }
799 800
800 GDBJIT(AddCode(name, 801 GDBJIT(AddCode(name,
801 Handle<Script>(info->script()), 802 Handle<Script>(info->script()),
802 Handle<Code>(info->code()))); 803 Handle<Code>(info->code())));
803 } 804 }
804 805
805 } } // namespace v8::internal 806 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-1209.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698