Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: src/deoptimizer.cc

Issue 1678953004: [builtins] Remove bunch of uses of %_Arguments and %_ArgumentsLength. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Fix deoptimizer adapted arguments materialization for builtins. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug/debug-evaluate.cc ('k') | src/js/array.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/debug/debug-evaluate.cc ('k') | src/js/array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698