| OLD | NEW |
| 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 Loading... |
| 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 3328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3618 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 3613 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
| 3619 __ add(pc, r1, Operand(masm_->CodeObject())); | 3614 __ add(pc, r1, Operand(masm_->CodeObject())); |
| 3620 } | 3615 } |
| 3621 | 3616 |
| 3622 | 3617 |
| 3623 #undef __ | 3618 #undef __ |
| 3624 | 3619 |
| 3625 } } // namespace v8::internal | 3620 } } // namespace v8::internal |
| 3626 | 3621 |
| 3627 #endif // V8_TARGET_ARCH_ARM | 3622 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |