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

Side by Side Diff: src/builtins/builtins-call.cc

Issue 2760233005: [snapshot] Move builtins generation into mksnapshot (Closed)
Patch Set: fix GYP builds Created 3 years, 8 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/builtins/builtins.cc ('k') | src/builtins/builtins-call-gen.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/builtins/builtins-utils.h" 5 #include "src/builtins/builtins-utils.h"
6 #include "src/builtins/builtins.h" 6 #include "src/builtins/builtins.h"
7 #include "src/handles-inl.h"
7 #include "src/isolate.h" 8 #include "src/isolate.h"
8 #include "src/macro-assembler.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 Handle<Code> Builtins::CallFunction(ConvertReceiverMode mode, 14 Handle<Code> Builtins::CallFunction(ConvertReceiverMode mode,
15 TailCallMode tail_call_mode) { 15 TailCallMode tail_call_mode) {
16 switch (tail_call_mode) { 16 switch (tail_call_mode) {
17 case TailCallMode::kDisallow: 17 case TailCallMode::kDisallow:
18 switch (mode) { 18 switch (mode) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 switch (tail_call_mode) { 71 switch (tail_call_mode) {
72 case TailCallMode::kDisallow: 72 case TailCallMode::kDisallow:
73 return CallBoundFunction(); 73 return CallBoundFunction();
74 case TailCallMode::kAllow: 74 case TailCallMode::kAllow:
75 return TailCallBoundFunction(); 75 return TailCallBoundFunction();
76 } 76 }
77 UNREACHABLE(); 77 UNREACHABLE();
78 return Handle<Code>::null(); 78 return Handle<Code>::null();
79 } 79 }
80 80
81 void Builtins::Generate_CallFunction_ReceiverIsNullOrUndefined(
82 MacroAssembler* masm) {
83 Generate_CallFunction(masm, ConvertReceiverMode::kNullOrUndefined,
84 TailCallMode::kDisallow);
85 }
86
87 void Builtins::Generate_CallFunction_ReceiverIsNotNullOrUndefined(
88 MacroAssembler* masm) {
89 Generate_CallFunction(masm, ConvertReceiverMode::kNotNullOrUndefined,
90 TailCallMode::kDisallow);
91 }
92
93 void Builtins::Generate_CallFunction_ReceiverIsAny(MacroAssembler* masm) {
94 Generate_CallFunction(masm, ConvertReceiverMode::kAny,
95 TailCallMode::kDisallow);
96 }
97
98 void Builtins::Generate_TailCallFunction_ReceiverIsNullOrUndefined(
99 MacroAssembler* masm) {
100 Generate_CallFunction(masm, ConvertReceiverMode::kNullOrUndefined,
101 TailCallMode::kAllow);
102 }
103
104 void Builtins::Generate_TailCallFunction_ReceiverIsNotNullOrUndefined(
105 MacroAssembler* masm) {
106 Generate_CallFunction(masm, ConvertReceiverMode::kNotNullOrUndefined,
107 TailCallMode::kAllow);
108 }
109
110 void Builtins::Generate_TailCallFunction_ReceiverIsAny(MacroAssembler* masm) {
111 Generate_CallFunction(masm, ConvertReceiverMode::kAny, TailCallMode::kAllow);
112 }
113
114 void Builtins::Generate_CallBoundFunction(MacroAssembler* masm) {
115 Generate_CallBoundFunctionImpl(masm, TailCallMode::kDisallow);
116 }
117
118 void Builtins::Generate_TailCallBoundFunction(MacroAssembler* masm) {
119 Generate_CallBoundFunctionImpl(masm, TailCallMode::kAllow);
120 }
121
122 void Builtins::Generate_Call_ReceiverIsNullOrUndefined(MacroAssembler* masm) {
123 Generate_Call(masm, ConvertReceiverMode::kNullOrUndefined,
124 TailCallMode::kDisallow);
125 }
126
127 void Builtins::Generate_Call_ReceiverIsNotNullOrUndefined(
128 MacroAssembler* masm) {
129 Generate_Call(masm, ConvertReceiverMode::kNotNullOrUndefined,
130 TailCallMode::kDisallow);
131 }
132
133 void Builtins::Generate_Call_ReceiverIsAny(MacroAssembler* masm) {
134 Generate_Call(masm, ConvertReceiverMode::kAny, TailCallMode::kDisallow);
135 }
136
137 void Builtins::Generate_TailCall_ReceiverIsNullOrUndefined(
138 MacroAssembler* masm) {
139 Generate_Call(masm, ConvertReceiverMode::kNullOrUndefined,
140 TailCallMode::kAllow);
141 }
142
143 void Builtins::Generate_TailCall_ReceiverIsNotNullOrUndefined(
144 MacroAssembler* masm) {
145 Generate_Call(masm, ConvertReceiverMode::kNotNullOrUndefined,
146 TailCallMode::kAllow);
147 }
148
149 void Builtins::Generate_TailCall_ReceiverIsAny(MacroAssembler* masm) {
150 Generate_Call(masm, ConvertReceiverMode::kAny, TailCallMode::kAllow);
151 }
152
153 void Builtins::Generate_CallForwardVarargs(MacroAssembler* masm) {
154 Generate_CallForwardVarargs(masm, masm->isolate()->builtins()->Call());
155 }
156
157 void Builtins::Generate_CallFunctionForwardVarargs(MacroAssembler* masm) {
158 Generate_CallForwardVarargs(masm,
159 masm->isolate()->builtins()->CallFunction());
160 }
161
162 } // namespace internal 81 } // namespace internal
163 } // namespace v8 82 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins.cc ('k') | src/builtins/builtins-call-gen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698