| 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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 Handle<DeoptimizationInputData> data = | 940 Handle<DeoptimizationInputData> data = |
| 941 factory()->NewDeoptimizationInputData(length, TENURED); | 941 factory()->NewDeoptimizationInputData(length, TENURED); |
| 942 | 942 |
| 943 Handle<ByteArray> translations = | 943 Handle<ByteArray> translations = |
| 944 translations_.CreateByteArray(isolate()->factory()); | 944 translations_.CreateByteArray(isolate()->factory()); |
| 945 data->SetTranslationByteArray(*translations); | 945 data->SetTranslationByteArray(*translations); |
| 946 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 946 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
| 947 | 947 |
| 948 Handle<FixedArray> literals = | 948 Handle<FixedArray> literals = |
| 949 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); | 949 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |
| 950 { ALLOW_HANDLE_DEREF(isolate(), | 950 { ALLOW_DEFERRED_HANDLE_DEREF( |
| 951 "copying a ZoneList of handles into a FixedArray"); | 951 isolate(), "copying a ZoneList of handles into a FixedArray"); |
| 952 for (int i = 0; i < deoptimization_literals_.length(); i++) { | 952 for (int i = 0; i < deoptimization_literals_.length(); i++) { |
| 953 literals->set(i, *deoptimization_literals_[i]); | 953 literals->set(i, *deoptimization_literals_[i]); |
| 954 } | 954 } |
| 955 data->SetLiteralArray(*literals); | 955 data->SetLiteralArray(*literals); |
| 956 } | 956 } |
| 957 | 957 |
| 958 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); | 958 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); |
| 959 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); | 959 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); |
| 960 | 960 |
| 961 // Populate the deoptimization entries. | 961 // Populate the deoptimization entries. |
| (...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1913 void LCodeGen::DoConstantD(LConstantD* instr) { | 1913 void LCodeGen::DoConstantD(LConstantD* instr) { |
| 1914 ASSERT(instr->result()->IsDoubleRegister()); | 1914 ASSERT(instr->result()->IsDoubleRegister()); |
| 1915 DwVfpRegister result = ToDoubleRegister(instr->result()); | 1915 DwVfpRegister result = ToDoubleRegister(instr->result()); |
| 1916 double v = instr->value(); | 1916 double v = instr->value(); |
| 1917 __ Vmov(result, v, scratch0()); | 1917 __ Vmov(result, v, scratch0()); |
| 1918 } | 1918 } |
| 1919 | 1919 |
| 1920 | 1920 |
| 1921 void LCodeGen::DoConstantT(LConstantT* instr) { | 1921 void LCodeGen::DoConstantT(LConstantT* instr) { |
| 1922 Handle<Object> value = instr->value(); | 1922 Handle<Object> value = instr->value(); |
| 1923 ALLOW_HANDLE_DEREF(isolate(), "smi check"); | 1923 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "smi check"); |
| 1924 if (value->IsSmi()) { | 1924 if (value->IsSmi()) { |
| 1925 __ mov(ToRegister(instr->result()), Operand(value)); | 1925 __ mov(ToRegister(instr->result()), Operand(value)); |
| 1926 } else { | 1926 } else { |
| 1927 __ LoadHeapObject(ToRegister(instr->result()), | 1927 __ LoadHeapObject(ToRegister(instr->result()), |
| 1928 Handle<HeapObject>::cast(value)); | 1928 Handle<HeapObject>::cast(value)); |
| 1929 } | 1929 } |
| 1930 } | 1930 } |
| 1931 | 1931 |
| 1932 | 1932 |
| 1933 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { | 1933 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { |
| (...skipping 3350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5284 __ cmp(scratch, Operand(tag)); | 5284 __ cmp(scratch, Operand(tag)); |
| 5285 DeoptimizeIf(ne, instr->environment()); | 5285 DeoptimizeIf(ne, instr->environment()); |
| 5286 } | 5286 } |
| 5287 } | 5287 } |
| 5288 } | 5288 } |
| 5289 | 5289 |
| 5290 | 5290 |
| 5291 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { | 5291 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { |
| 5292 Register reg = ToRegister(instr->value()); | 5292 Register reg = ToRegister(instr->value()); |
| 5293 Handle<JSFunction> target = instr->hydrogen()->target(); | 5293 Handle<JSFunction> target = instr->hydrogen()->target(); |
| 5294 ALLOW_HANDLE_DEREF(isolate(), "smi check"); | 5294 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "smi check"); |
| 5295 if (isolate()->heap()->InNewSpace(*target)) { | 5295 if (isolate()->heap()->InNewSpace(*target)) { |
| 5296 Register reg = ToRegister(instr->value()); | 5296 Register reg = ToRegister(instr->value()); |
| 5297 Handle<JSGlobalPropertyCell> cell = | 5297 Handle<JSGlobalPropertyCell> cell = |
| 5298 isolate()->factory()->NewJSGlobalPropertyCell(target); | 5298 isolate()->factory()->NewJSGlobalPropertyCell(target); |
| 5299 __ mov(ip, Operand(Handle<Object>(cell))); | 5299 __ mov(ip, Operand(Handle<Object>(cell))); |
| 5300 __ ldr(ip, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); | 5300 __ ldr(ip, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); |
| 5301 __ cmp(reg, ip); | 5301 __ cmp(reg, ip); |
| 5302 } else { | 5302 } else { |
| 5303 __ cmp(reg, Operand(target)); | 5303 __ cmp(reg, Operand(target)); |
| 5304 } | 5304 } |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6000 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 6000 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 6001 __ ldr(result, FieldMemOperand(scratch, | 6001 __ ldr(result, FieldMemOperand(scratch, |
| 6002 FixedArray::kHeaderSize - kPointerSize)); | 6002 FixedArray::kHeaderSize - kPointerSize)); |
| 6003 __ bind(&done); | 6003 __ bind(&done); |
| 6004 } | 6004 } |
| 6005 | 6005 |
| 6006 | 6006 |
| 6007 #undef __ | 6007 #undef __ |
| 6008 | 6008 |
| 6009 } } // namespace v8::internal | 6009 } } // namespace v8::internal |
| OLD | NEW |