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

Side by Side Diff: src/compiler/linkage.cc

Issue 2467513002: [builtins]: Uniformly push argument count in TF-generated builtins (Closed)
Patch Set: Cleanup arm64 Created 4 years, 1 month 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/compiler/linkage.h ('k') | src/compiler/mips/code-generator-mips.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/linkage.h" 5 #include "src/compiler/linkage.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/builtins/builtins-utils.h" 8 #include "src/builtins/builtins-utils.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-info.h" 10 #include "src/compilation-info.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 } 101 }
102 } 102 }
103 return callee_slots_above_sp - tail_caller_slots_above_sp; 103 return callee_slots_above_sp - tail_caller_slots_above_sp;
104 } 104 }
105 105
106 bool CallDescriptor::CanTailCall(const Node* node) const { 106 bool CallDescriptor::CanTailCall(const Node* node) const {
107 return HasSameReturnLocationsAs(CallDescriptorOf(node->op())); 107 return HasSameReturnLocationsAs(CallDescriptorOf(node->op()));
108 } 108 }
109 109
110 int CallDescriptor::CalculateFixedFrameSize() const {
111 if (IsJSFunctionCall()) {
Benedikt Meurer 2016/11/03 05:00:03 Please turn this into a switch over the call descr
danno 2016/11/03 07:55:38 Done.
112 if (PushArgumentCount()) {
113 return OptimizedBuiltinFrameConstants::kFixedSlotCount;
114 } else {
115 return StandardFrameConstants::kFixedSlotCount;
116 }
117 }
118 return IsCFunctionCall() ? (CommonFrameConstants::kFixedSlotCountAboveFp +
119 CommonFrameConstants::kCPSlotCount)
120 : TypedFrameConstants::kFixedSlotCount;
121 }
110 122
111 CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) { 123 CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) {
112 DCHECK(!info->IsStub()); 124 DCHECK(!info->IsStub());
113 if (!info->closure().is_null()) { 125 if (!info->closure().is_null()) {
114 // If we are compiling a JS function, use a JS call descriptor, 126 // If we are compiling a JS function, use a JS call descriptor,
115 // plus the receiver. 127 // plus the receiver.
116 SharedFunctionInfo* shared = info->closure()->shared(); 128 SharedFunctionInfo* shared = info->closure()->shared();
117 return GetJSCallDescriptor(zone, info->is_osr(), 129 return GetJSCallDescriptor(zone, info->is_osr(),
118 1 + shared->internal_formal_parameter_count(), 130 1 + shared->internal_formal_parameter_count(),
119 CallDescriptor::kNoFlags); 131 CallDescriptor::kNoFlags);
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 DCHECK(loc == regloc(kContextRegister, MachineType::AnyTagged())); 502 DCHECK(loc == regloc(kContextRegister, MachineType::AnyTagged()));
491 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot, 503 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot,
492 MachineType::AnyTagged()); 504 MachineType::AnyTagged());
493 } 505 }
494 } 506 }
495 507
496 508
497 } // namespace compiler 509 } // namespace compiler
498 } // namespace internal 510 } // namespace internal
499 } // namespace v8 511 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/linkage.h ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698