OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 Handle<DeoptimizationInputData> data = | 830 Handle<DeoptimizationInputData> data = |
831 factory()->NewDeoptimizationInputData(length, TENURED); | 831 factory()->NewDeoptimizationInputData(length, TENURED); |
832 | 832 |
833 Handle<ByteArray> translations = | 833 Handle<ByteArray> translations = |
834 translations_.CreateByteArray(isolate()->factory()); | 834 translations_.CreateByteArray(isolate()->factory()); |
835 data->SetTranslationByteArray(*translations); | 835 data->SetTranslationByteArray(*translations); |
836 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 836 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
837 | 837 |
838 Handle<FixedArray> literals = | 838 Handle<FixedArray> literals = |
839 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); | 839 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |
840 { ALLOW_HANDLE_DEREF(isolate(), | 840 { ALLOW_DEFERRED_HANDLE_DEREF( |
841 "copying a ZoneList of handles into a FixedArray"); | 841 isolate(), "copying a ZoneList of handles into a FixedArray"); |
842 for (int i = 0; i < deoptimization_literals_.length(); i++) { | 842 for (int i = 0; i < deoptimization_literals_.length(); i++) { |
843 literals->set(i, *deoptimization_literals_[i]); | 843 literals->set(i, *deoptimization_literals_[i]); |
844 } | 844 } |
845 data->SetLiteralArray(*literals); | 845 data->SetLiteralArray(*literals); |
846 } | 846 } |
847 | 847 |
848 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); | 848 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); |
849 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); | 849 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); |
850 | 850 |
851 // Populate the deoptimization entries. | 851 // Populate the deoptimization entries. |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1581 } else { | 1581 } else { |
1582 Register tmp = ToRegister(instr->temp()); | 1582 Register tmp = ToRegister(instr->temp()); |
1583 __ Set(tmp, int_val); | 1583 __ Set(tmp, int_val); |
1584 __ movq(res, tmp); | 1584 __ movq(res, tmp); |
1585 } | 1585 } |
1586 } | 1586 } |
1587 | 1587 |
1588 | 1588 |
1589 void LCodeGen::DoConstantT(LConstantT* instr) { | 1589 void LCodeGen::DoConstantT(LConstantT* instr) { |
1590 Handle<Object> value = instr->value(); | 1590 Handle<Object> value = instr->value(); |
1591 ALLOW_HANDLE_DEREF(isolate(), "smi check"); | 1591 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "smi check"); |
1592 if (value->IsSmi()) { | 1592 if (value->IsSmi()) { |
1593 __ Move(ToRegister(instr->result()), value); | 1593 __ Move(ToRegister(instr->result()), value); |
1594 } else { | 1594 } else { |
1595 __ LoadHeapObject(ToRegister(instr->result()), | 1595 __ LoadHeapObject(ToRegister(instr->result()), |
1596 Handle<HeapObject>::cast(value)); | 1596 Handle<HeapObject>::cast(value)); |
1597 } | 1597 } |
1598 } | 1598 } |
1599 | 1599 |
1600 | 1600 |
1601 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { | 1601 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { |
(...skipping 3727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5329 LOperand* input = instr->value(); | 5329 LOperand* input = instr->value(); |
5330 EmitPushTaggedOperand(input); | 5330 EmitPushTaggedOperand(input); |
5331 CallRuntime(Runtime::kTypeof, 1, instr); | 5331 CallRuntime(Runtime::kTypeof, 1, instr); |
5332 } | 5332 } |
5333 | 5333 |
5334 | 5334 |
5335 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { | 5335 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { |
5336 ASSERT(!operand->IsDoubleRegister()); | 5336 ASSERT(!operand->IsDoubleRegister()); |
5337 if (operand->IsConstantOperand()) { | 5337 if (operand->IsConstantOperand()) { |
5338 Handle<Object> object = ToHandle(LConstantOperand::cast(operand)); | 5338 Handle<Object> object = ToHandle(LConstantOperand::cast(operand)); |
5339 ALLOW_HANDLE_DEREF(isolate(), "smi check"); | 5339 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "smi check"); |
5340 if (object->IsSmi()) { | 5340 if (object->IsSmi()) { |
5341 __ Push(Handle<Smi>::cast(object)); | 5341 __ Push(Handle<Smi>::cast(object)); |
5342 } else { | 5342 } else { |
5343 __ PushHeapObject(Handle<HeapObject>::cast(object)); | 5343 __ PushHeapObject(Handle<HeapObject>::cast(object)); |
5344 } | 5344 } |
5345 } else if (operand->IsRegister()) { | 5345 } else if (operand->IsRegister()) { |
5346 __ push(ToRegister(operand)); | 5346 __ push(ToRegister(operand)); |
5347 } else { | 5347 } else { |
5348 __ push(ToOperand(operand)); | 5348 __ push(ToOperand(operand)); |
5349 } | 5349 } |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5698 FixedArray::kHeaderSize - kPointerSize)); | 5698 FixedArray::kHeaderSize - kPointerSize)); |
5699 __ bind(&done); | 5699 __ bind(&done); |
5700 } | 5700 } |
5701 | 5701 |
5702 | 5702 |
5703 #undef __ | 5703 #undef __ |
5704 | 5704 |
5705 } } // namespace v8::internal | 5705 } } // namespace v8::internal |
5706 | 5706 |
5707 #endif // V8_TARGET_ARCH_X64 | 5707 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |