OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 // ... and fill the rest with holes. | 1187 // ... and fill the rest with holes. |
1188 __ Move(kScratchRegister, Factory::the_hole_value()); | 1188 __ Move(kScratchRegister, Factory::the_hole_value()); |
1189 for (int i = 1; i < kAllocationDelta; i++) { | 1189 for (int i = 1; i < kAllocationDelta; i++) { |
1190 __ movq(Operand(rdx, i * kPointerSize), kScratchRegister); | 1190 __ movq(Operand(rdx, i * kPointerSize), kScratchRegister); |
1191 } | 1191 } |
1192 | 1192 |
1193 // Restore receiver to rdx as finish sequence assumes it's here. | 1193 // Restore receiver to rdx as finish sequence assumes it's here. |
1194 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); | 1194 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
1195 | 1195 |
1196 // Increment element's and array's sizes. | 1196 // Increment element's and array's sizes. |
1197 __ addq(FieldOperand(rbx, FixedArray::kLengthOffset), | 1197 __ addl(FieldOperand(rbx, FixedArray::kLengthOffset), |
1198 Immediate(kAllocationDelta)); | 1198 Immediate(kAllocationDelta)); |
1199 __ movq(FieldOperand(rdx, JSArray::kLengthOffset), rax); | 1199 __ movq(FieldOperand(rdx, JSArray::kLengthOffset), rax); |
1200 | 1200 |
1201 // Elements are in new space, so no remembered set updates are necessary. | 1201 // Elements are in new space, so no remembered set updates are necessary. |
1202 __ ret((argc + 1) * kPointerSize); | 1202 __ ret((argc + 1) * kPointerSize); |
1203 | 1203 |
1204 __ bind(&call_builtin); | 1204 __ bind(&call_builtin); |
1205 } | 1205 } |
1206 | 1206 |
1207 __ TailCallExternalReference(ExternalReference(Builtins::c_ArrayPush), | 1207 __ TailCallExternalReference(ExternalReference(Builtins::c_ArrayPush), |
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2360 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 2360 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
2361 | 2361 |
2362 // Return the generated code. | 2362 // Return the generated code. |
2363 return GetCode(); | 2363 return GetCode(); |
2364 } | 2364 } |
2365 | 2365 |
2366 | 2366 |
2367 #undef __ | 2367 #undef __ |
2368 | 2368 |
2369 } } // namespace v8::internal | 2369 } } // namespace v8::internal |
OLD | NEW |