| 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 944 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 955   // If the code object is null, just return to the unoptimized code. | 955   // If the code object is null, just return to the unoptimized code. | 
| 956   Label skip; | 956   Label skip; | 
| 957   __ cmp(r0, Operand(Smi::FromInt(0))); | 957   __ cmp(r0, Operand(Smi::FromInt(0))); | 
| 958   __ b(ne, &skip); | 958   __ b(ne, &skip); | 
| 959   __ Ret(); | 959   __ Ret(); | 
| 960 | 960 | 
| 961   __ bind(&skip); | 961   __ bind(&skip); | 
| 962 | 962 | 
| 963   // Load deoptimization data from the code object. | 963   // Load deoptimization data from the code object. | 
| 964   // <deopt_data> = <code>[#deoptimization_data_offset] | 964   // <deopt_data> = <code>[#deoptimization_data_offset] | 
| 965   __ ldr(r1, MemOperand(r0, Code::kDeoptimizationDataOffset - kHeapObjectTag)); | 965   __ ldr(r1, FieldMemOperand(r0, Code::kDeoptimizationDataOffset)); | 
| 966 | 966 | 
| 967   // Load the OSR entrypoint offset from the deoptimization data. | 967   { ConstantPoolUnavailableScope constant_pool_unavailable(masm); | 
| 968   // <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset] | 968     if (FLAG_enable_ool_constant_pool) { | 
| 969   __ ldr(r1, MemOperand(r1, FixedArray::OffsetOfElementAt( | 969       __ ldr(pp, FieldMemOperand(r0, Code::kConstantPoolOffset)); | 
| 970       DeoptimizationInputData::kOsrPcOffsetIndex) - kHeapObjectTag)); | 970     } | 
| 971 | 971 | 
| 972   // Compute the target address = code_obj + header_size + osr_offset | 972     // Load the OSR entrypoint offset from the deoptimization data. | 
| 973   // <entry_addr> = <code_obj> + #header_size + <osr_offset> | 973     // <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset] | 
| 974   __ add(r0, r0, Operand::SmiUntag(r1)); | 974     __ ldr(r1, FieldMemOperand(r1, FixedArray::OffsetOfElementAt( | 
| 975   __ add(lr, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); | 975         DeoptimizationInputData::kOsrPcOffsetIndex))); | 
| 976 | 976 | 
| 977   // And "return" to the OSR entry point of the function. | 977     // Compute the target address = code_obj + header_size + osr_offset | 
| 978   __ Ret(); | 978     // <entry_addr> = <code_obj> + #header_size + <osr_offset> | 
|  | 979     __ add(r0, r0, Operand::SmiUntag(r1)); | 
|  | 980     __ add(lr, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); | 
|  | 981 | 
|  | 982     // And "return" to the OSR entry point of the function. | 
|  | 983     __ Ret(); | 
|  | 984   } | 
| 979 } | 985 } | 
| 980 | 986 | 
| 981 | 987 | 
| 982 void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) { | 988 void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) { | 
| 983   // We check the stack limit as indicator that recompilation might be done. | 989   // We check the stack limit as indicator that recompilation might be done. | 
| 984   Label ok; | 990   Label ok; | 
| 985   __ LoadRoot(ip, Heap::kStackLimitRootIndex); | 991   __ LoadRoot(ip, Heap::kStackLimitRootIndex); | 
| 986   __ cmp(sp, Operand(ip)); | 992   __ cmp(sp, Operand(ip)); | 
| 987   __ b(hs, &ok); | 993   __ b(hs, &ok); | 
| 988   { | 994   { | 
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1473   __ bind(&dont_adapt_arguments); | 1479   __ bind(&dont_adapt_arguments); | 
| 1474   __ Jump(r3); | 1480   __ Jump(r3); | 
| 1475 } | 1481 } | 
| 1476 | 1482 | 
| 1477 | 1483 | 
| 1478 #undef __ | 1484 #undef __ | 
| 1479 | 1485 | 
| 1480 } }  // namespace v8::internal | 1486 } }  // namespace v8::internal | 
| 1481 | 1487 | 
| 1482 #endif  // V8_TARGET_ARCH_ARM | 1488 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW | 
|---|