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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 data->SetTranslationByteArray(*translations); | 575 data->SetTranslationByteArray(*translations); |
576 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 576 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
577 | 577 |
578 Handle<FixedArray> literals = | 578 Handle<FixedArray> literals = |
579 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); | 579 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |
580 for (int i = 0; i < deoptimization_literals_.length(); i++) { | 580 for (int i = 0; i < deoptimization_literals_.length(); i++) { |
581 literals->set(i, *deoptimization_literals_[i]); | 581 literals->set(i, *deoptimization_literals_[i]); |
582 } | 582 } |
583 data->SetLiteralArray(*literals); | 583 data->SetLiteralArray(*literals); |
584 | 584 |
585 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id())); | 585 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); |
586 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); | 586 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); |
587 | 587 |
588 // Populate the deoptimization entries. | 588 // Populate the deoptimization entries. |
589 for (int i = 0; i < length; i++) { | 589 for (int i = 0; i < length; i++) { |
590 LEnvironment* env = deoptimizations_[i]; | 590 LEnvironment* env = deoptimizations_[i]; |
591 data->SetAstId(i, Smi::FromInt(env->ast_id())); | 591 data->SetAstId(i, env->ast_id()); |
592 data->SetTranslationIndex(i, Smi::FromInt(env->translation_index())); | 592 data->SetTranslationIndex(i, Smi::FromInt(env->translation_index())); |
593 data->SetArgumentsStackHeight(i, | 593 data->SetArgumentsStackHeight(i, |
594 Smi::FromInt(env->arguments_stack_height())); | 594 Smi::FromInt(env->arguments_stack_height())); |
595 data->SetPc(i, Smi::FromInt(env->pc_offset())); | 595 data->SetPc(i, Smi::FromInt(env->pc_offset())); |
596 } | 596 } |
597 code->set_deoptimization_data(*data); | 597 code->set_deoptimization_data(*data); |
598 } | 598 } |
599 | 599 |
600 | 600 |
601 int LCodeGen::DefineDeoptimizationLiteral(Handle<Object> literal) { | 601 int LCodeGen::DefineDeoptimizationLiteral(Handle<Object> literal) { |
(...skipping 4498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5100 FixedArray::kHeaderSize - kPointerSize)); | 5100 FixedArray::kHeaderSize - kPointerSize)); |
5101 __ bind(&done); | 5101 __ bind(&done); |
5102 } | 5102 } |
5103 | 5103 |
5104 | 5104 |
5105 #undef __ | 5105 #undef __ |
5106 | 5106 |
5107 } } // namespace v8::internal | 5107 } } // namespace v8::internal |
5108 | 5108 |
5109 #endif // V8_TARGET_ARCH_X64 | 5109 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |