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 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1617 // reg = number of parameters | 1617 // reg = number of parameters |
1618 // reg = failure handler address | 1618 // reg = failure handler address |
1619 // reg = saved frame | 1619 // reg = saved frame |
1620 // reg = JSFunction context | 1620 // reg = JSFunction context |
1621 // | 1621 // |
1622 | 1622 |
1623 CHECK(compiled_code_->is_hydrogen_stub()); | 1623 CHECK(compiled_code_->is_hydrogen_stub()); |
1624 int major_key = CodeStub::GetMajorKey(compiled_code_); | 1624 int major_key = CodeStub::GetMajorKey(compiled_code_); |
1625 CodeStubInterfaceDescriptor* descriptor = | 1625 CodeStubInterfaceDescriptor* descriptor = |
1626 isolate_->code_stub_interface_descriptor(major_key); | 1626 isolate_->code_stub_interface_descriptor(major_key); |
| 1627 // Check that there is a matching descriptor to the major key. |
| 1628 // This will fail if there has not been one installed to the isolate. |
| 1629 DCHECK_EQ(descriptor->MajorKey(), major_key); |
1627 | 1630 |
1628 // The output frame must have room for all pushed register parameters | 1631 // The output frame must have room for all pushed register parameters |
1629 // and the standard stack frame slots. Include space for an argument | 1632 // and the standard stack frame slots. Include space for an argument |
1630 // object to the callee and optionally the space to pass the argument | 1633 // object to the callee and optionally the space to pass the argument |
1631 // object to the stub failure handler. | 1634 // object to the stub failure handler. |
1632 int param_count = descriptor->GetEnvironmentParameterCount(); | 1635 int param_count = descriptor->GetEnvironmentParameterCount(); |
1633 CHECK_GE(param_count, 0); | 1636 CHECK_GE(param_count, 0); |
1634 | 1637 |
1635 int height_in_bytes = kPointerSize * param_count + sizeof(Arguments) + | 1638 int height_in_bytes = kPointerSize * param_count + sizeof(Arguments) + |
1636 kPointerSize; | 1639 kPointerSize; |
(...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3670 } | 3673 } |
3671 | 3674 |
3672 | 3675 |
3673 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 3676 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
3674 v->VisitPointer(BitCast<Object**>(&function_)); | 3677 v->VisitPointer(BitCast<Object**>(&function_)); |
3675 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 3678 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
3676 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 3679 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
3677 } | 3680 } |
3678 | 3681 |
3679 } } // namespace v8::internal | 3682 } } // namespace v8::internal |
OLD | NEW |