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 5983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5994 | 5994 |
5995 __ SmiTag(size); | 5995 __ SmiTag(size); |
5996 PushSafepointRegistersScope scope(this); | 5996 PushSafepointRegistersScope scope(this); |
5997 // TODO(3095996): Get rid of this. For now, we need to make the | 5997 // TODO(3095996): Get rid of this. For now, we need to make the |
5998 // result register contain a valid pointer because it is already | 5998 // result register contain a valid pointer because it is already |
5999 // contained in the register pointer map. | 5999 // contained in the register pointer map. |
6000 if (!size.is(result)) { | 6000 if (!size.is(result)) { |
6001 __ StoreToSafepointRegisterSlot(result, size); | 6001 __ StoreToSafepointRegisterSlot(result, size); |
6002 } | 6002 } |
6003 __ push(size); | 6003 __ push(size); |
6004 CallRuntimeFromDeferred( | 6004 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { |
6005 Runtime::kAllocateInNewSpace, 1, instr, instr->context()); | 6005 CallRuntimeFromDeferred( |
| 6006 Runtime::kAllocateInOldPointerSpace, 1, instr, instr->context()); |
| 6007 } else { |
| 6008 CallRuntimeFromDeferred( |
| 6009 Runtime::kAllocateInNewSpace, 1, instr, instr->context()); |
| 6010 } |
6006 __ StoreToSafepointRegisterSlot(result, eax); | 6011 __ StoreToSafepointRegisterSlot(result, eax); |
6007 } | 6012 } |
6008 | 6013 |
6009 | 6014 |
6010 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) { | 6015 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) { |
6011 ASSERT(ToRegister(instr->context()).is(esi)); | 6016 ASSERT(ToRegister(instr->context()).is(esi)); |
6012 Handle<FixedArray> literals(instr->environment()->closure()->literals()); | 6017 Handle<FixedArray> literals(instr->environment()->closure()->literals()); |
6013 ElementsKind boilerplate_elements_kind = | 6018 ElementsKind boilerplate_elements_kind = |
6014 instr->hydrogen()->boilerplate_elements_kind(); | 6019 instr->hydrogen()->boilerplate_elements_kind(); |
6015 AllocationSiteMode allocation_site_mode = | 6020 AllocationSiteMode allocation_site_mode = |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6544 FixedArray::kHeaderSize - kPointerSize)); | 6549 FixedArray::kHeaderSize - kPointerSize)); |
6545 __ bind(&done); | 6550 __ bind(&done); |
6546 } | 6551 } |
6547 | 6552 |
6548 | 6553 |
6549 #undef __ | 6554 #undef __ |
6550 | 6555 |
6551 } } // namespace v8::internal | 6556 } } // namespace v8::internal |
6552 | 6557 |
6553 #endif // V8_TARGET_ARCH_IA32 | 6558 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |