| OLD | NEW |
| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 VisitDeclarations(scope()->declarations()); | 289 VisitDeclarations(scope()->declarations()); |
| 290 } | 290 } |
| 291 | 291 |
| 292 { Comment cmnt(masm_, "[ Stack check"); | 292 { Comment cmnt(masm_, "[ Stack check"); |
| 293 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); | 293 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); |
| 294 Label ok; | 294 Label ok; |
| 295 __ LoadRoot(ip, Heap::kStackLimitRootIndex); | 295 __ LoadRoot(ip, Heap::kStackLimitRootIndex); |
| 296 __ cmp(sp, Operand(ip)); | 296 __ cmp(sp, Operand(ip)); |
| 297 __ b(hs, &ok); | 297 __ b(hs, &ok); |
| 298 PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize); | 298 PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize); |
| 299 __ Call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); | 299 __ CallRuntime(Runtime::kStackCheck, 0); |
| 300 __ bind(&ok); | 300 __ bind(&ok); |
| 301 } | 301 } |
| 302 | 302 |
| 303 { Comment cmnt(masm_, "[ Body"); | 303 { Comment cmnt(masm_, "[ Body"); |
| 304 ASSERT(loop_depth() == 0); | 304 ASSERT(loop_depth() == 0); |
| 305 VisitStatements(function()->body()); | 305 VisitStatements(function()->body()); |
| 306 ASSERT(loop_depth() == 0); | 306 ASSERT(loop_depth() == 0); |
| 307 } | 307 } |
| 308 } | 308 } |
| 309 | 309 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 } | 407 } |
| 408 EmitProfilingCounterDecrement(weight); | 408 EmitProfilingCounterDecrement(weight); |
| 409 Label ok; | 409 Label ok; |
| 410 __ b(pl, &ok); | 410 __ b(pl, &ok); |
| 411 __ push(r0); | 411 __ push(r0); |
| 412 if (info_->ShouldSelfOptimize() && FLAG_direct_self_opt) { | 412 if (info_->ShouldSelfOptimize() && FLAG_direct_self_opt) { |
| 413 __ ldr(r2, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 413 __ ldr(r2, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 414 __ push(r2); | 414 __ push(r2); |
| 415 __ CallRuntime(Runtime::kOptimizeFunctionOnNextCall, 1); | 415 __ CallRuntime(Runtime::kOptimizeFunctionOnNextCall, 1); |
| 416 } else { | 416 } else { |
| 417 __ Call(isolate()->builtins()->InterruptCheck(), | 417 __ CallRuntime(Runtime::kInterrupt, 0); |
| 418 RelocInfo::CODE_TARGET); | |
| 419 } | 418 } |
| 420 __ pop(r0); | 419 __ pop(r0); |
| 421 EmitProfilingCounterReset(); | 420 EmitProfilingCounterReset(); |
| 422 __ bind(&ok); | 421 __ bind(&ok); |
| 423 } | 422 } |
| 424 | 423 |
| 425 #ifdef DEBUG | 424 #ifdef DEBUG |
| 426 // Add a label for checking the size of the code used for returning. | 425 // Add a label for checking the size of the code used for returning. |
| 427 Label check_exit_codesize; | 426 Label check_exit_codesize; |
| 428 masm_->bind(&check_exit_codesize); | 427 masm_->bind(&check_exit_codesize); |
| (...skipping 4455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4884 *context_length = 0; | 4883 *context_length = 0; |
| 4885 return previous_; | 4884 return previous_; |
| 4886 } | 4885 } |
| 4887 | 4886 |
| 4888 | 4887 |
| 4889 #undef __ | 4888 #undef __ |
| 4890 | 4889 |
| 4891 } } // namespace v8::internal | 4890 } } // namespace v8::internal |
| 4892 | 4891 |
| 4893 #endif // V8_TARGET_ARCH_ARM | 4892 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |