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 3326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3337 __ cmp(r1, r3); | 3337 __ cmp(r1, r3); |
3338 __ b(ne, ¬_array_function); | 3338 __ b(ne, ¬_array_function); |
3339 | 3339 |
3340 // The target function is the Array constructor, | 3340 // The target function is the Array constructor, |
3341 // Create an AllocationSite if we don't already have it, store it in the cell | 3341 // Create an AllocationSite if we don't already have it, store it in the cell |
3342 { | 3342 { |
3343 FrameScope scope(masm, StackFrame::INTERNAL); | 3343 FrameScope scope(masm, StackFrame::INTERNAL); |
3344 | 3344 |
3345 // Arguments register must be smi-tagged to call out. | 3345 // Arguments register must be smi-tagged to call out. |
3346 __ SmiTag(r0); | 3346 __ SmiTag(r0); |
3347 __ push(r0); | 3347 __ Push(r2, r1, r0); |
3348 __ push(r1); | |
3349 __ push(r2); | |
3350 | 3348 |
3351 CreateAllocationSiteStub create_stub; | 3349 CreateAllocationSiteStub create_stub; |
3352 __ CallStub(&create_stub); | 3350 __ CallStub(&create_stub); |
3353 | 3351 |
3354 __ pop(r2); | 3352 __ Pop(r2, r1, r0); |
3355 __ pop(r1); | |
3356 __ pop(r0); | |
3357 __ SmiUntag(r0); | 3353 __ SmiUntag(r0); |
3358 } | 3354 } |
3359 __ b(&done); | 3355 __ b(&done); |
3360 | 3356 |
3361 __ bind(¬_array_function); | 3357 __ bind(¬_array_function); |
3362 __ str(r1, FieldMemOperand(r2, Cell::kValueOffset)); | 3358 __ str(r1, FieldMemOperand(r2, Cell::kValueOffset)); |
3363 // No need for a write barrier here - cells are rescanned. | 3359 // No need for a write barrier here - cells are rescanned. |
3364 | 3360 |
3365 __ bind(&done); | 3361 __ bind(&done); |
3366 } | 3362 } |
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5014 | 5010 |
5015 | 5011 |
5016 void ICCompareStub::GenerateMiss(MacroAssembler* masm) { | 5012 void ICCompareStub::GenerateMiss(MacroAssembler* masm) { |
5017 { | 5013 { |
5018 // Call the runtime system in a fresh internal frame. | 5014 // Call the runtime system in a fresh internal frame. |
5019 ExternalReference miss = | 5015 ExternalReference miss = |
5020 ExternalReference(IC_Utility(IC::kCompareIC_Miss), masm->isolate()); | 5016 ExternalReference(IC_Utility(IC::kCompareIC_Miss), masm->isolate()); |
5021 | 5017 |
5022 FrameScope scope(masm, StackFrame::INTERNAL); | 5018 FrameScope scope(masm, StackFrame::INTERNAL); |
5023 __ Push(r1, r0); | 5019 __ Push(r1, r0); |
5024 __ push(lr); | 5020 __ Push(lr, r1, r0); |
5025 __ Push(r1, r0); | |
5026 __ mov(ip, Operand(Smi::FromInt(op_))); | 5021 __ mov(ip, Operand(Smi::FromInt(op_))); |
5027 __ push(ip); | 5022 __ push(ip); |
5028 __ CallExternalReference(miss, 3); | 5023 __ CallExternalReference(miss, 3); |
5029 // Compute the entry point of the rewritten stub. | 5024 // Compute the entry point of the rewritten stub. |
5030 __ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); | 5025 __ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
5031 // Restore registers. | 5026 // Restore registers. |
5032 __ pop(lr); | 5027 __ pop(lr); |
5033 __ pop(r0); | 5028 __ Pop(r1, r0); |
5034 __ pop(r1); | |
5035 } | 5029 } |
5036 | 5030 |
5037 __ Jump(r2); | 5031 __ Jump(r2); |
5038 } | 5032 } |
5039 | 5033 |
5040 | 5034 |
5041 void DirectCEntryStub::Generate(MacroAssembler* masm) { | 5035 void DirectCEntryStub::Generate(MacroAssembler* masm) { |
5042 // Place the return address on the stack, making the call | 5036 // Place the return address on the stack, making the call |
5043 // GC safe. The RegExp backend also relies on this. | 5037 // GC safe. The RegExp backend also relies on this. |
5044 __ str(lr, MemOperand(sp, 0)); | 5038 __ str(lr, MemOperand(sp, 0)); |
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6068 __ bind(&fast_elements_case); | 6062 __ bind(&fast_elements_case); |
6069 GenerateCase(masm, FAST_ELEMENTS); | 6063 GenerateCase(masm, FAST_ELEMENTS); |
6070 } | 6064 } |
6071 | 6065 |
6072 | 6066 |
6073 #undef __ | 6067 #undef __ |
6074 | 6068 |
6075 } } // namespace v8::internal | 6069 } } // namespace v8::internal |
6076 | 6070 |
6077 #endif // V8_TARGET_ARCH_ARM | 6071 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |