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 4412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4423 // Make sure the function is the Array() function | 4423 // Make sure the function is the Array() function |
4424 __ LoadArrayFunction(r3); | 4424 __ LoadArrayFunction(r3); |
4425 __ cmp(r1, r3); | 4425 __ cmp(r1, r3); |
4426 __ b(ne, ¬_array_function); | 4426 __ b(ne, ¬_array_function); |
4427 | 4427 |
4428 // The target function is the Array constructor, | 4428 // The target function is the Array constructor, |
4429 // Create an AllocationSite if we don't already have it, store it in the cell | 4429 // Create an AllocationSite if we don't already have it, store it in the cell |
4430 { | 4430 { |
4431 FrameScope scope(masm, StackFrame::INTERNAL); | 4431 FrameScope scope(masm, StackFrame::INTERNAL); |
4432 | 4432 |
| 4433 __ SmiTag(r0); |
4433 __ push(r0); | 4434 __ push(r0); |
4434 __ push(r1); | 4435 __ push(r1); |
4435 __ push(r2); | 4436 __ push(r2); |
4436 | 4437 |
4437 CreateAllocationSiteStub create_stub; | 4438 CreateAllocationSiteStub create_stub; |
4438 __ CallStub(&create_stub); | 4439 __ CallStub(&create_stub); |
4439 | 4440 |
4440 __ pop(r2); | 4441 __ pop(r2); |
4441 __ pop(r1); | 4442 __ pop(r1); |
4442 __ pop(r0); | 4443 __ pop(r0); |
| 4444 __ SmiUntag(r0); |
4443 } | 4445 } |
4444 __ b(&done); | 4446 __ b(&done); |
4445 | 4447 |
4446 __ bind(¬_array_function); | 4448 __ bind(¬_array_function); |
4447 __ str(r1, FieldMemOperand(r2, Cell::kValueOffset)); | 4449 __ str(r1, FieldMemOperand(r2, Cell::kValueOffset)); |
4448 // No need for a write barrier here - cells are rescanned. | 4450 // No need for a write barrier here - cells are rescanned. |
4449 | 4451 |
4450 __ bind(&done); | 4452 __ bind(&done); |
4451 } | 4453 } |
4452 | 4454 |
(...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7163 __ bind(&fast_elements_case); | 7165 __ bind(&fast_elements_case); |
7164 GenerateCase(masm, FAST_ELEMENTS); | 7166 GenerateCase(masm, FAST_ELEMENTS); |
7165 } | 7167 } |
7166 | 7168 |
7167 | 7169 |
7168 #undef __ | 7170 #undef __ |
7169 | 7171 |
7170 } } // namespace v8::internal | 7172 } } // namespace v8::internal |
7171 | 7173 |
7172 #endif // V8_TARGET_ARCH_ARM | 7174 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |