OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 ? Deoptimizer::LAZY | 854 ? Deoptimizer::LAZY |
855 : Deoptimizer::EAGER; | 855 : Deoptimizer::EAGER; |
856 DeoptimizeIf(condition, environment, bailout_type, src1, src2); | 856 DeoptimizeIf(condition, environment, bailout_type, src1, src2); |
857 } | 857 } |
858 | 858 |
859 | 859 |
860 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { | 860 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |
861 int length = deoptimizations_.length(); | 861 int length = deoptimizations_.length(); |
862 if (length == 0) return; | 862 if (length == 0) return; |
863 Handle<DeoptimizationInputData> data = | 863 Handle<DeoptimizationInputData> data = |
864 factory()->NewDeoptimizationInputData(length, TENURED); | 864 DeoptimizationInputData::New(isolate(), length, TENURED); |
865 | 865 |
866 Handle<ByteArray> translations = | 866 Handle<ByteArray> translations = |
867 translations_.CreateByteArray(isolate()->factory()); | 867 translations_.CreateByteArray(isolate()->factory()); |
868 data->SetTranslationByteArray(*translations); | 868 data->SetTranslationByteArray(*translations); |
869 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 869 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
870 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); | 870 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); |
871 if (info_->IsOptimizing()) { | 871 if (info_->IsOptimizing()) { |
872 // Reference to shared function info does not change between phases. | 872 // Reference to shared function info does not change between phases. |
873 AllowDeferredHandleDereference allow_handle_dereference; | 873 AllowDeferredHandleDereference allow_handle_dereference; |
874 data->SetSharedFunctionInfo(*info_->shared_info()); | 874 data->SetSharedFunctionInfo(*info_->shared_info()); |
(...skipping 5022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5897 __ lw(result, FieldMemOperand(scratch, | 5897 __ lw(result, FieldMemOperand(scratch, |
5898 FixedArray::kHeaderSize - kPointerSize)); | 5898 FixedArray::kHeaderSize - kPointerSize)); |
5899 __ bind(deferred->exit()); | 5899 __ bind(deferred->exit()); |
5900 __ bind(&done); | 5900 __ bind(&done); |
5901 } | 5901 } |
5902 | 5902 |
5903 | 5903 |
5904 #undef __ | 5904 #undef __ |
5905 | 5905 |
5906 } } // namespace v8::internal | 5906 } } // namespace v8::internal |
OLD | NEW |