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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 6447007: Fix a bug that occurs when functions are defined with more than 16,382 parame... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 10 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/ia32/codegen-ia32.cc ('k') | src/ia32/lithium-codegen-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 // Add a label for checking the size of the code used for returning. 303 // Add a label for checking the size of the code used for returning.
304 Label check_exit_codesize; 304 Label check_exit_codesize;
305 masm_->bind(&check_exit_codesize); 305 masm_->bind(&check_exit_codesize);
306 #endif 306 #endif
307 SetSourcePosition(function()->end_position() - 1); 307 SetSourcePosition(function()->end_position() - 1);
308 __ RecordJSReturn(); 308 __ RecordJSReturn();
309 // Do not use the leave instruction here because it is too short to 309 // Do not use the leave instruction here because it is too short to
310 // patch with the code required by the debugger. 310 // patch with the code required by the debugger.
311 __ mov(esp, ebp); 311 __ mov(esp, ebp);
312 __ pop(ebp); 312 __ pop(ebp);
313 __ ret((scope()->num_parameters() + 1) * kPointerSize); 313
314 int arguments_bytes = (scope()->num_parameters() + 1) * kPointerSize;
315 __ Ret(arguments_bytes, ecx);
314 #ifdef ENABLE_DEBUGGER_SUPPORT 316 #ifdef ENABLE_DEBUGGER_SUPPORT
315 // Check that the size of the code used for returning matches what is 317 // Check that the size of the code used for returning is large enough
316 // expected by the debugger. 318 // for the debugger's requirements.
317 ASSERT_EQ(Assembler::kJSReturnSequenceLength, 319 ASSERT(Assembler::kJSReturnSequenceLength <=
318 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize)); 320 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize));
319 #endif 321 #endif
320 } 322 }
321 } 323 }
322 324
323 325
324 FullCodeGenerator::ConstantOperand FullCodeGenerator::GetConstantOperand( 326 FullCodeGenerator::ConstantOperand FullCodeGenerator::GetConstantOperand(
325 Token::Value op, Expression* left, Expression* right) { 327 Token::Value op, Expression* left, Expression* right) {
326 ASSERT(ShouldInlineSmiCase(op)); 328 ASSERT(ShouldInlineSmiCase(op));
327 if (op == Token::DIV || op == Token::MOD || op == Token::MUL) { 329 if (op == Token::DIV || op == Token::MOD || op == Token::MUL) {
328 // We never generate inlined constant smi operations for these. 330 // We never generate inlined constant smi operations for these.
(...skipping 4070 matching lines...) Expand 10 before | Expand all | Expand 10 after
4399 // And return. 4401 // And return.
4400 __ ret(0); 4402 __ ret(0);
4401 } 4403 }
4402 4404
4403 4405
4404 #undef __ 4406 #undef __
4405 4407
4406 } } // namespace v8::internal 4408 } } // namespace v8::internal
4407 4409
4408 #endif // V8_TARGET_ARCH_IA32 4410 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698