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/deoptimizer.h" | 5 #include "src/deoptimizer.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/ast/prettyprinter.h" | 8 #include "src/ast/prettyprinter.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/disasm.h" | 10 #include "src/disasm.h" |
(...skipping 3567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3578 int frame_index) { | 3578 int frame_index) { |
3579 if (frame_index == 0) { | 3579 if (frame_index == 0) { |
3580 // Top level frame -> we need to go to the parent frame on the stack. | 3580 // Top level frame -> we need to go to the parent frame on the stack. |
3581 if (!has_adapted_arguments_) return false; | 3581 if (!has_adapted_arguments_) return false; |
3582 | 3582 |
3583 // This is top level frame, so we need to go to the stack to get | 3583 // This is top level frame, so we need to go to the stack to get |
3584 // this function's argument. (Note that this relies on not inlining | 3584 // this function's argument. (Note that this relies on not inlining |
3585 // recursive functions!) | 3585 // recursive functions!) |
3586 Handle<JSFunction> function = | 3586 Handle<JSFunction> function = |
3587 Handle<JSFunction>::cast(frames_[frame_index].front().GetValue()); | 3587 Handle<JSFunction>::cast(frames_[frame_index].front().GetValue()); |
3588 *result = Handle<JSObject>::cast(Accessors::FunctionGetArguments(function)); | 3588 *result = Accessors::FunctionGetArguments(function); |
3589 return true; | 3589 return true; |
3590 } else { | 3590 } else { |
3591 TranslatedFrame* previous_frame = &(frames_[frame_index]); | 3591 TranslatedFrame* previous_frame = &(frames_[frame_index]); |
3592 if (previous_frame->kind() != TranslatedFrame::kArgumentsAdaptor) { | 3592 if (previous_frame->kind() != TranslatedFrame::kArgumentsAdaptor) { |
3593 return false; | 3593 return false; |
3594 } | 3594 } |
3595 // We get the adapted arguments from the parent translation. | 3595 // We get the adapted arguments from the parent translation. |
3596 int length = previous_frame->height(); | 3596 int length = previous_frame->height(); |
3597 Handle<JSFunction> function = | 3597 Handle<JSFunction> function = |
3598 Handle<JSFunction>::cast(previous_frame->front().GetValue()); | 3598 Handle<JSFunction>::cast(previous_frame->front().GetValue()); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3711 DCHECK(value_info->IsMaterializedObject()); | 3711 DCHECK(value_info->IsMaterializedObject()); |
3712 | 3712 |
3713 value_info->value_ = | 3713 value_info->value_ = |
3714 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 3714 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
3715 } | 3715 } |
3716 } | 3716 } |
3717 } | 3717 } |
3718 | 3718 |
3719 } // namespace internal | 3719 } // namespace internal |
3720 } // namespace v8 | 3720 } // namespace v8 |
OLD | NEW |