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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 ? Deoptimizer::LAZY | 890 ? Deoptimizer::LAZY |
891 : Deoptimizer::EAGER; | 891 : Deoptimizer::EAGER; |
892 DeoptimizeIf(condition, environment, bailout_type, src1, src2); | 892 DeoptimizeIf(condition, environment, bailout_type, src1, src2); |
893 } | 893 } |
894 | 894 |
895 | 895 |
896 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { | 896 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |
897 int length = deoptimizations_.length(); | 897 int length = deoptimizations_.length(); |
898 if (length == 0) return; | 898 if (length == 0) return; |
899 Handle<DeoptimizationInputData> data = | 899 Handle<DeoptimizationInputData> data = |
900 DeoptimizationInputData::New(isolate(), length, 0, TENURED); | 900 DeoptimizationInputData::New(isolate(), length, TENURED); |
901 | 901 |
902 Handle<ByteArray> translations = | 902 Handle<ByteArray> translations = |
903 translations_.CreateByteArray(isolate()->factory()); | 903 translations_.CreateByteArray(isolate()->factory()); |
904 data->SetTranslationByteArray(*translations); | 904 data->SetTranslationByteArray(*translations); |
905 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 905 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
906 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); | 906 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); |
907 if (info_->IsOptimizing()) { | 907 if (info_->IsOptimizing()) { |
908 // Reference to shared function info does not change between phases. | 908 // Reference to shared function info does not change between phases. |
909 AllowDeferredHandleDereference allow_handle_dereference; | 909 AllowDeferredHandleDereference allow_handle_dereference; |
910 data->SetSharedFunctionInfo(*info_->shared_info()); | 910 data->SetSharedFunctionInfo(*info_->shared_info()); |
(...skipping 4990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5901 __ li(at, scope_info); | 5901 __ li(at, scope_info); |
5902 __ Push(at, ToRegister(instr->function())); | 5902 __ Push(at, ToRegister(instr->function())); |
5903 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5903 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5904 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5904 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5905 } | 5905 } |
5906 | 5906 |
5907 | 5907 |
5908 #undef __ | 5908 #undef __ |
5909 | 5909 |
5910 } } // namespace v8::internal | 5910 } } // namespace v8::internal |
OLD | NEW |