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

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

Issue 6458027: Fix assert error on ARM triggered by large numbers of function parameters. (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/arm/codegen-arm.cc ('k') | no next file » | 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 int32_t sp_delta = (scope()->num_parameters() + 1) * kPointerSize; 261 int32_t sp_delta = (scope()->num_parameters() + 1) * kPointerSize;
262 CodeGenerator::RecordPositions(masm_, function()->end_position() - 1); 262 CodeGenerator::RecordPositions(masm_, function()->end_position() - 1);
263 __ RecordJSReturn(); 263 __ RecordJSReturn();
264 masm_->mov(sp, fp); 264 masm_->mov(sp, fp);
265 masm_->ldm(ia_w, sp, fp.bit() | lr.bit()); 265 masm_->ldm(ia_w, sp, fp.bit() | lr.bit());
266 masm_->add(sp, sp, Operand(sp_delta)); 266 masm_->add(sp, sp, Operand(sp_delta));
267 masm_->Jump(lr); 267 masm_->Jump(lr);
268 } 268 }
269 269
270 #ifdef DEBUG 270 #ifdef DEBUG
271 // Check that the size of the code used for returning matches what is 271 // Check that the size of the code used for returning is large enough
272 // expected by the debugger. If the sp_delts above cannot be encoded in the 272 // for the debugger's requirements.
273 // add instruction the add will generate two instructions. 273 ASSERT(Assembler::kJSReturnSequenceInstructions <=
274 int return_sequence_length = 274 masm_->InstructionsGeneratedSince(&check_exit_codesize));
275 masm_->InstructionsGeneratedSince(&check_exit_codesize);
276 CHECK(return_sequence_length ==
277 Assembler::kJSReturnSequenceInstructions ||
278 return_sequence_length ==
279 Assembler::kJSReturnSequenceInstructions + 1);
280 #endif 275 #endif
281 } 276 }
282 } 277 }
283 278
284 279
285 FullCodeGenerator::ConstantOperand FullCodeGenerator::GetConstantOperand( 280 FullCodeGenerator::ConstantOperand FullCodeGenerator::GetConstantOperand(
286 Token::Value op, Expression* left, Expression* right) { 281 Token::Value op, Expression* left, Expression* right) {
287 ASSERT(ShouldInlineSmiCase(op)); 282 ASSERT(ShouldInlineSmiCase(op));
288 return kNoConstants; 283 return kNoConstants;
289 } 284 }
(...skipping 3344 matching lines...) Expand 10 before | Expand all | Expand 10 after
3634 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3629 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3635 __ add(pc, r1, Operand(masm_->CodeObject())); 3630 __ add(pc, r1, Operand(masm_->CodeObject()));
3636 } 3631 }
3637 3632
3638 3633
3639 #undef __ 3634 #undef __
3640 3635
3641 } } // namespace v8::internal 3636 } } // namespace v8::internal
3642 3637
3643 #endif // V8_TARGET_ARCH_ARM 3638 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698