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

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.cc

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move has_simple_parameters_ to DeclarationScope Created 4 years, 4 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
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/crankshaft/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 __ CallStub(&stub); 600 __ CallStub(&stub);
601 // Result of FastNewFunctionContextStub is always in new space. 601 // Result of FastNewFunctionContextStub is always in new space.
602 need_write_barrier = false; 602 need_write_barrier = false;
603 } 603 }
604 RecordSafepoint(deopt_mode); 604 RecordSafepoint(deopt_mode);
605 // Context is returned in x0. It replaces the context passed to us. It's 605 // Context is returned in x0. It replaces the context passed to us. It's
606 // saved in the stack and kept live in cp. 606 // saved in the stack and kept live in cp.
607 __ Mov(cp, x0); 607 __ Mov(cp, x0);
608 __ Str(x0, MemOperand(fp, StandardFrameConstants::kContextOffset)); 608 __ Str(x0, MemOperand(fp, StandardFrameConstants::kContextOffset));
609 // Copy any necessary parameters into the context. 609 // Copy any necessary parameters into the context.
610 int num_parameters = scope()->num_parameters(); 610 int num_parameters = info()->scope()->num_parameters();
611 int first_parameter = scope()->has_this_declaration() ? -1 : 0; 611 int first_parameter = info()->scope()->has_this_declaration() ? -1 : 0;
612 for (int i = first_parameter; i < num_parameters; i++) { 612 for (int i = first_parameter; i < num_parameters; i++) {
613 Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i); 613 Variable* var = (i == -1) ? info()->scope()->receiver()
614 : info()->scope()->parameter(i);
614 if (var->IsContextSlot()) { 615 if (var->IsContextSlot()) {
615 Register value = x0; 616 Register value = x0;
616 Register scratch = x3; 617 Register scratch = x3;
617 618
618 int parameter_offset = StandardFrameConstants::kCallerSPOffset + 619 int parameter_offset = StandardFrameConstants::kCallerSPOffset +
619 (num_parameters - 1 - i) * kPointerSize; 620 (num_parameters - 1 - i) * kPointerSize;
620 // Load parameter from stack. 621 // Load parameter from stack.
621 __ Ldr(value, MemOperand(fp, parameter_offset)); 622 __ Ldr(value, MemOperand(fp, parameter_offset));
622 // Store it in the context. 623 // Store it in the context.
623 MemOperand target = ContextMemOperand(cp, var->index()); 624 MemOperand target = ContextMemOperand(cp, var->index());
(...skipping 5072 matching lines...) Expand 10 before | Expand all | Expand 10 after
5696 // Index is equal to negated out of object property index plus 1. 5697 // Index is equal to negated out of object property index plus 1.
5697 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5698 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5698 __ Ldr(result, FieldMemOperand(result, 5699 __ Ldr(result, FieldMemOperand(result,
5699 FixedArray::kHeaderSize - kPointerSize)); 5700 FixedArray::kHeaderSize - kPointerSize));
5700 __ Bind(deferred->exit()); 5701 __ Bind(deferred->exit());
5701 __ Bind(&done); 5702 __ Bind(&done);
5702 } 5703 }
5703 5704
5704 } // namespace internal 5705 } // namespace internal
5705 } // namespace v8 5706 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698