| 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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1024 Handle<DeoptimizationInputData> data = | 1024 Handle<DeoptimizationInputData> data = |
| 1025 factory()->NewDeoptimizationInputData(length, TENURED); | 1025 factory()->NewDeoptimizationInputData(length, TENURED); |
| 1026 | 1026 |
| 1027 Handle<ByteArray> translations = | 1027 Handle<ByteArray> translations = |
| 1028 translations_.CreateByteArray(isolate()->factory()); | 1028 translations_.CreateByteArray(isolate()->factory()); |
| 1029 data->SetTranslationByteArray(*translations); | 1029 data->SetTranslationByteArray(*translations); |
| 1030 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 1030 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
| 1031 | 1031 |
| 1032 Handle<FixedArray> literals = | 1032 Handle<FixedArray> literals = |
| 1033 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); | 1033 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |
| 1034 { ALLOW_HANDLE_DEREF(isolate(), | 1034 { AllowDeferredHandleDereference copy_handles; |
| 1035 "copying a ZoneList of handles into a FixedArray"); | |
| 1036 for (int i = 0; i < deoptimization_literals_.length(); i++) { | 1035 for (int i = 0; i < deoptimization_literals_.length(); i++) { |
| 1037 literals->set(i, *deoptimization_literals_[i]); | 1036 literals->set(i, *deoptimization_literals_[i]); |
| 1038 } | 1037 } |
| 1039 data->SetLiteralArray(*literals); | 1038 data->SetLiteralArray(*literals); |
| 1040 } | 1039 } |
| 1041 | 1040 |
| 1042 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); | 1041 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); |
| 1043 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); | 1042 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); |
| 1044 | 1043 |
| 1045 // Populate the deoptimization entries. | 1044 // Populate the deoptimization entries. |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1803 } | 1802 } |
| 1804 } | 1803 } |
| 1805 } | 1804 } |
| 1806 } | 1805 } |
| 1807 } | 1806 } |
| 1808 | 1807 |
| 1809 | 1808 |
| 1810 void LCodeGen::DoConstantT(LConstantT* instr) { | 1809 void LCodeGen::DoConstantT(LConstantT* instr) { |
| 1811 Register reg = ToRegister(instr->result()); | 1810 Register reg = ToRegister(instr->result()); |
| 1812 Handle<Object> handle = instr->value(); | 1811 Handle<Object> handle = instr->value(); |
| 1813 ALLOW_HANDLE_DEREF(isolate(), "smi check"); | 1812 AllowDeferredHandleDereference smi_check; |
| 1814 if (handle->IsHeapObject()) { | 1813 if (handle->IsHeapObject()) { |
| 1815 __ LoadHeapObject(reg, Handle<HeapObject>::cast(handle)); | 1814 __ LoadHeapObject(reg, Handle<HeapObject>::cast(handle)); |
| 1816 } else { | 1815 } else { |
| 1817 __ Set(reg, Immediate(handle)); | 1816 __ Set(reg, Immediate(handle)); |
| 1818 } | 1817 } |
| 1819 } | 1818 } |
| 1820 | 1819 |
| 1821 | 1820 |
| 1822 void LCodeGen::DoFixedArrayBaseLength( | 1821 void LCodeGen::DoFixedArrayBaseLength( |
| 1823 LFixedArrayBaseLength* instr) { | 1822 LFixedArrayBaseLength* instr) { |
| (...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3056 } | 3055 } |
| 3057 __ mov(result, factory()->undefined_value()); | 3056 __ mov(result, factory()->undefined_value()); |
| 3058 } | 3057 } |
| 3059 } | 3058 } |
| 3060 | 3059 |
| 3061 | 3060 |
| 3062 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { | 3061 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { |
| 3063 ASSERT(!operand->IsDoubleRegister()); | 3062 ASSERT(!operand->IsDoubleRegister()); |
| 3064 if (operand->IsConstantOperand()) { | 3063 if (operand->IsConstantOperand()) { |
| 3065 Handle<Object> object = ToHandle(LConstantOperand::cast(operand)); | 3064 Handle<Object> object = ToHandle(LConstantOperand::cast(operand)); |
| 3066 ALLOW_HANDLE_DEREF(isolate(), "smi check"); | 3065 AllowDeferredHandleDereference smi_check; |
| 3067 if (object->IsSmi()) { | 3066 if (object->IsSmi()) { |
| 3068 __ Push(Handle<Smi>::cast(object)); | 3067 __ Push(Handle<Smi>::cast(object)); |
| 3069 } else { | 3068 } else { |
| 3070 __ PushHeapObject(Handle<HeapObject>::cast(object)); | 3069 __ PushHeapObject(Handle<HeapObject>::cast(object)); |
| 3071 } | 3070 } |
| 3072 } else if (operand->IsRegister()) { | 3071 } else if (operand->IsRegister()) { |
| 3073 __ push(ToRegister(operand)); | 3072 __ push(ToRegister(operand)); |
| 3074 } else { | 3073 } else { |
| 3075 __ push(ToOperand(operand)); | 3074 __ push(ToOperand(operand)); |
| 3076 } | 3075 } |
| (...skipping 3524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6601 FixedArray::kHeaderSize - kPointerSize)); | 6600 FixedArray::kHeaderSize - kPointerSize)); |
| 6602 __ bind(&done); | 6601 __ bind(&done); |
| 6603 } | 6602 } |
| 6604 | 6603 |
| 6605 | 6604 |
| 6606 #undef __ | 6605 #undef __ |
| 6607 | 6606 |
| 6608 } } // namespace v8::internal | 6607 } } // namespace v8::internal |
| 6609 | 6608 |
| 6610 #endif // V8_TARGET_ARCH_IA32 | 6609 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |