| 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 Label table_start; | 353 Label table_start; |
| 354 __ bind(&table_start); | 354 __ bind(&table_start); |
| 355 Label needs_frame_not_call; | 355 Label needs_frame_not_call; |
| 356 Label needs_frame_is_call; | 356 Label needs_frame_is_call; |
| 357 for (int i = 0; i < deopt_jump_table_.length(); i++) { | 357 for (int i = 0; i < deopt_jump_table_.length(); i++) { |
| 358 __ bind(&deopt_jump_table_[i].label); | 358 __ bind(&deopt_jump_table_[i].label); |
| 359 Address entry = deopt_jump_table_[i].address; | 359 Address entry = deopt_jump_table_[i].address; |
| 360 bool is_lazy_deopt = deopt_jump_table_[i].is_lazy_deopt; | 360 bool is_lazy_deopt = deopt_jump_table_[i].is_lazy_deopt; |
| 361 Deoptimizer::BailoutType type = | 361 Deoptimizer::BailoutType type = |
| 362 is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER; | 362 is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER; |
| 363 int id = Deoptimizer::GetDeoptimizationId(entry, type); | 363 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); |
| 364 if (id == Deoptimizer::kNotDeoptimizationEntry) { | 364 if (id == Deoptimizer::kNotDeoptimizationEntry) { |
| 365 Comment(";;; jump table entry %d.", i); | 365 Comment(";;; jump table entry %d.", i); |
| 366 } else { | 366 } else { |
| 367 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id); | 367 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id); |
| 368 } | 368 } |
| 369 __ li(t9, Operand(ExternalReference::ForDeoptEntry(entry))); | 369 __ li(t9, Operand(ExternalReference::ForDeoptEntry(entry))); |
| 370 if (deopt_jump_table_[i].needs_frame) { | 370 if (deopt_jump_table_[i].needs_frame) { |
| 371 if (is_lazy_deopt) { | 371 if (is_lazy_deopt) { |
| 372 if (needs_frame_is_call.is_bound()) { | 372 if (needs_frame_is_call.is_bound()) { |
| 373 __ Branch(&needs_frame_is_call); | 373 __ Branch(&needs_frame_is_call); |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 } | 890 } |
| 891 } | 891 } |
| 892 | 892 |
| 893 | 893 |
| 894 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { | 894 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |
| 895 int length = deoptimizations_.length(); | 895 int length = deoptimizations_.length(); |
| 896 if (length == 0) return; | 896 if (length == 0) return; |
| 897 Handle<DeoptimizationInputData> data = | 897 Handle<DeoptimizationInputData> data = |
| 898 factory()->NewDeoptimizationInputData(length, TENURED); | 898 factory()->NewDeoptimizationInputData(length, TENURED); |
| 899 | 899 |
| 900 Handle<ByteArray> translations = translations_.CreateByteArray(); | 900 Handle<ByteArray> translations = |
| 901 translations_.CreateByteArray(isolate()->factory()); |
| 901 data->SetTranslationByteArray(*translations); | 902 data->SetTranslationByteArray(*translations); |
| 902 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 903 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
| 903 | 904 |
| 904 Handle<FixedArray> literals = | 905 Handle<FixedArray> literals = |
| 905 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); | 906 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |
| 906 for (int i = 0; i < deoptimization_literals_.length(); i++) { | 907 for (int i = 0; i < deoptimization_literals_.length(); i++) { |
| 907 literals->set(i, *deoptimization_literals_[i]); | 908 literals->set(i, *deoptimization_literals_[i]); |
| 908 } | 909 } |
| 909 data->SetLiteralArray(*literals); | 910 data->SetLiteralArray(*literals); |
| 910 | 911 |
| (...skipping 5191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6102 __ Subu(scratch, result, scratch); | 6103 __ Subu(scratch, result, scratch); |
| 6103 __ lw(result, FieldMemOperand(scratch, | 6104 __ lw(result, FieldMemOperand(scratch, |
| 6104 FixedArray::kHeaderSize - kPointerSize)); | 6105 FixedArray::kHeaderSize - kPointerSize)); |
| 6105 __ bind(&done); | 6106 __ bind(&done); |
| 6106 } | 6107 } |
| 6107 | 6108 |
| 6108 | 6109 |
| 6109 #undef __ | 6110 #undef __ |
| 6110 | 6111 |
| 6111 } } // namespace v8::internal | 6112 } } // namespace v8::internal |
| OLD | NEW |