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

Side by Side Diff: src/compiler.cc

Issue 14639008: Allow more virtual registers to be encoded in LUnallocated. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 | « src/arm/lithium-arm.cc ('k') | src/ia32/lithium-ia32.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 return AbortOptimization(); 292 return AbortOptimization();
293 } 293 }
294 294
295 // Due to an encoding limit on LUnallocated operands in the Lithium 295 // Due to an encoding limit on LUnallocated operands in the Lithium
296 // language, we cannot optimize functions with too many formal parameters 296 // language, we cannot optimize functions with too many formal parameters
297 // or perform on-stack replacement for function with too many 297 // or perform on-stack replacement for function with too many
298 // stack-allocated local variables. 298 // stack-allocated local variables.
299 // 299 //
300 // The encoding is as a signed value, with parameters and receiver using 300 // The encoding is as a signed value, with parameters and receiver using
301 // the negative indices and locals the non-negative ones. 301 // the negative indices and locals the non-negative ones.
302 const int parameter_limit = -LUnallocated::kMinFixedIndex; 302 const int parameter_limit = -LUnallocated::kMinFixedSlotIndex;
303 Scope* scope = info()->scope(); 303 Scope* scope = info()->scope();
304 if ((scope->num_parameters() + 1) > parameter_limit) { 304 if ((scope->num_parameters() + 1) > parameter_limit) {
305 info()->set_bailout_reason("too many parameters"); 305 info()->set_bailout_reason("too many parameters");
306 return AbortOptimization(); 306 return AbortOptimization();
307 } 307 }
308 308
309 const int locals_limit = LUnallocated::kMaxFixedIndex; 309 const int locals_limit = LUnallocated::kMaxFixedSlotIndex;
310 if (!info()->osr_ast_id().IsNone() && 310 if (!info()->osr_ast_id().IsNone() &&
311 scope->num_parameters() + 1 + scope->num_stack_slots() > locals_limit) { 311 scope->num_parameters() + 1 + scope->num_stack_slots() > locals_limit) {
312 info()->set_bailout_reason("too many parameters/locals"); 312 info()->set_bailout_reason("too many parameters/locals");
313 return AbortOptimization(); 313 return AbortOptimization();
314 } 314 }
315 315
316 // Take --hydrogen-filter into account. 316 // Take --hydrogen-filter into account.
317 Handle<String> name = info()->function()->debug_name(); 317 Handle<String> name = info()->function()->debug_name();
318 if (*FLAG_hydrogen_filter != '\0') { 318 if (*FLAG_hydrogen_filter != '\0') {
319 Vector<const char> filter = CStrVector(FLAG_hydrogen_filter); 319 Vector<const char> filter = CStrVector(FLAG_hydrogen_filter);
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 } 1167 }
1168 } 1168 }
1169 1169
1170 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1170 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1171 Handle<Script>(info->script()), 1171 Handle<Script>(info->script()),
1172 Handle<Code>(info->code()), 1172 Handle<Code>(info->code()),
1173 info)); 1173 info));
1174 } 1174 }
1175 1175
1176 } } // namespace v8::internal 1176 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698