OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/disasm.h" | 10 #include "src/disasm.h" |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 PrintF(trace_scope_->file(), | 751 PrintF(trace_scope_->file(), |
752 "[deoptimizing (DEOPT %s): begin 0x%08" V8PRIxPTR " ", | 752 "[deoptimizing (DEOPT %s): begin 0x%08" V8PRIxPTR " ", |
753 MessageFor(bailout_type_), | 753 MessageFor(bailout_type_), |
754 reinterpret_cast<intptr_t>(function_)); | 754 reinterpret_cast<intptr_t>(function_)); |
755 PrintFunctionName(); | 755 PrintFunctionName(); |
756 PrintF(trace_scope_->file(), | 756 PrintF(trace_scope_->file(), |
757 " (opt #%d) @%d, FP to SP delta: %d]\n", | 757 " (opt #%d) @%d, FP to SP delta: %d]\n", |
758 input_data->OptimizationId()->value(), | 758 input_data->OptimizationId()->value(), |
759 bailout_id_, | 759 bailout_id_, |
760 fp_to_sp_delta_); | 760 fp_to_sp_delta_); |
761 if (bailout_type_ == EAGER || bailout_type_ == SOFT) { | 761 if (bailout_type_ == EAGER || bailout_type_ == SOFT || |
| 762 (compiled_code_->is_hydrogen_stub())) { |
762 compiled_code_->PrintDeoptLocation(trace_scope_->file(), bailout_id_); | 763 compiled_code_->PrintDeoptLocation(trace_scope_->file(), bailout_id_); |
763 } | 764 } |
764 } | 765 } |
765 | 766 |
766 BailoutId node_id = input_data->AstId(bailout_id_); | 767 BailoutId node_id = input_data->AstId(bailout_id_); |
767 ByteArray* translations = input_data->TranslationByteArray(); | 768 ByteArray* translations = input_data->TranslationByteArray(); |
768 unsigned translation_index = | 769 unsigned translation_index = |
769 input_data->TranslationIndex(bailout_id_)->value(); | 770 input_data->TranslationIndex(bailout_id_)->value(); |
770 | 771 |
771 // Do the input frame to output frame(s) translation. | 772 // Do the input frame to output frame(s) translation. |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 // and spilled to stack | .... | | 1542 // and spilled to stack | .... | |
1542 // +-------------------------+ | 1543 // +-------------------------+ |
1543 // | caller stack param n | | 1544 // | caller stack param n | |
1544 // +-------------------------+<-spreg | 1545 // +-------------------------+<-spreg |
1545 // reg = number of parameters | 1546 // reg = number of parameters |
1546 // reg = failure handler address | 1547 // reg = failure handler address |
1547 // reg = saved frame | 1548 // reg = saved frame |
1548 // reg = JSFunction context | 1549 // reg = JSFunction context |
1549 // | 1550 // |
1550 | 1551 |
1551 CHECK(compiled_code_->is_crankshafted() && | 1552 CHECK(compiled_code_->is_hydrogen_stub()); |
1552 compiled_code_->kind() != Code::OPTIMIZED_FUNCTION); | |
1553 int major_key = compiled_code_->major_key(); | 1553 int major_key = compiled_code_->major_key(); |
1554 CodeStubInterfaceDescriptor* descriptor = | 1554 CodeStubInterfaceDescriptor* descriptor = |
1555 isolate_->code_stub_interface_descriptor(major_key); | 1555 isolate_->code_stub_interface_descriptor(major_key); |
1556 | 1556 |
1557 // The output frame must have room for all pushed register parameters | 1557 // The output frame must have room for all pushed register parameters |
1558 // and the standard stack frame slots. Include space for an argument | 1558 // and the standard stack frame slots. Include space for an argument |
1559 // object to the callee and optionally the space to pass the argument | 1559 // object to the callee and optionally the space to pass the argument |
1560 // object to the stub failure handler. | 1560 // object to the stub failure handler. |
1561 CHECK_GE(descriptor->register_param_count(), 0); | 1561 CHECK_GE(descriptor->register_param_count(), 0); |
1562 int height_in_bytes = kPointerSize * descriptor->register_param_count() + | 1562 int height_in_bytes = kPointerSize * descriptor->register_param_count() + |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3588 } | 3588 } |
3589 | 3589 |
3590 | 3590 |
3591 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 3591 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
3592 v->VisitPointer(BitCast<Object**>(&function_)); | 3592 v->VisitPointer(BitCast<Object**>(&function_)); |
3593 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 3593 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
3594 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 3594 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
3595 } | 3595 } |
3596 | 3596 |
3597 } } // namespace v8::internal | 3597 } } // namespace v8::internal |
OLD | NEW |