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

Side by Side Diff: src/full-codegen/s390/full-codegen-s390.cc

Issue 2603003002: PPC/s390: [builtins] More stubs to the builtin-o-sphere. (Closed)
Patch Set: Created 3 years, 11 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/full-codegen/ppc/full-codegen-ppc.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #if V8_TARGET_ARCH_S390 5 #if V8_TARGET_ARCH_S390
6 6
7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
11 #include "src/code-stubs.h" 11 #include "src/code-stubs.h"
12 #include "src/codegen.h" 12 #include "src/codegen.h"
13 #include "src/compilation-info.h" 13 #include "src/compilation-info.h"
14 #include "src/compiler.h" 14 #include "src/compiler.h"
15 #include "src/debug/debug.h" 15 #include "src/debug/debug.h"
16 #include "src/full-codegen/full-codegen.h"
16 #include "src/ic/ic.h" 17 #include "src/ic/ic.h"
17 18
18 #include "src/s390/code-stubs-s390.h" 19 #include "src/s390/code-stubs-s390.h"
19 #include "src/s390/macro-assembler-s390.h" 20 #include "src/s390/macro-assembler-s390.h"
20 21
21 namespace v8 { 22 namespace v8 {
22 namespace internal { 23 namespace internal {
23 24
24 #define __ ACCESS_MASM(masm()) 25 #define __ ACCESS_MASM(masm())
25 26
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 __ Push(info->scope()->scope_info()); 204 __ Push(info->scope()->scope_info());
204 __ CallRuntime(Runtime::kNewScriptContext); 205 __ CallRuntime(Runtime::kNewScriptContext);
205 PrepareForBailoutForId(BailoutId::ScriptContext(), 206 PrepareForBailoutForId(BailoutId::ScriptContext(),
206 BailoutState::TOS_REGISTER); 207 BailoutState::TOS_REGISTER);
207 // The new target value is not used, clobbering is safe. 208 // The new target value is not used, clobbering is safe.
208 DCHECK_NULL(info->scope()->new_target_var()); 209 DCHECK_NULL(info->scope()->new_target_var());
209 } else { 210 } else {
210 if (info->scope()->new_target_var() != nullptr) { 211 if (info->scope()->new_target_var() != nullptr) {
211 __ push(r5); // Preserve new target. 212 __ push(r5); // Preserve new target.
212 } 213 }
213 if (slots <= FastNewFunctionContextStub::MaximumSlots()) { 214 if (slots <=
214 FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type()); 215 ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) {
216 Callable callable = CodeFactory::FastNewFunctionContext(
217 isolate(), info->scope()->scope_type());
215 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), 218 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
216 Operand(slots)); 219 Operand(slots));
217 __ CallStub(&stub); 220 __ Call(callable.code(), RelocInfo::CODE_TARGET);
218 // Result of FastNewFunctionContextStub is always in new space. 221 // Result of the FastNewFunctionContext builtin is always in new space.
219 need_write_barrier = false; 222 need_write_barrier = false;
220 } else { 223 } else {
221 __ push(r3); 224 __ push(r3);
222 __ Push(Smi::FromInt(info->scope()->scope_type())); 225 __ Push(Smi::FromInt(info->scope()->scope_type()));
223 __ CallRuntime(Runtime::kNewFunctionContext); 226 __ CallRuntime(Runtime::kNewFunctionContext);
224 } 227 }
225 if (info->scope()->new_target_var() != nullptr) { 228 if (info->scope()->new_target_var() != nullptr) {
226 __ pop(r5); // Preserve new target. 229 __ pop(r5); // Preserve new target.
227 } 230 }
228 } 231 }
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 Handle<FixedArray> constant_properties = expr->constant_properties(); 1145 Handle<FixedArray> constant_properties = expr->constant_properties();
1143 __ LoadP(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1146 __ LoadP(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1144 __ LoadSmiLiteral(r4, Smi::FromInt(expr->literal_index())); 1147 __ LoadSmiLiteral(r4, Smi::FromInt(expr->literal_index()));
1145 __ mov(r3, Operand(constant_properties)); 1148 __ mov(r3, Operand(constant_properties));
1146 int flags = expr->ComputeFlags(); 1149 int flags = expr->ComputeFlags();
1147 __ LoadSmiLiteral(r2, Smi::FromInt(flags)); 1150 __ LoadSmiLiteral(r2, Smi::FromInt(flags));
1148 if (MustCreateObjectLiteralWithRuntime(expr)) { 1151 if (MustCreateObjectLiteralWithRuntime(expr)) {
1149 __ Push(r5, r4, r3, r2); 1152 __ Push(r5, r4, r3, r2);
1150 __ CallRuntime(Runtime::kCreateObjectLiteral); 1153 __ CallRuntime(Runtime::kCreateObjectLiteral);
1151 } else { 1154 } else {
1152 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); 1155 Callable callable = CodeFactory::FastCloneShallowObject(
1153 __ CallStub(&stub); 1156 isolate(), expr->properties_count());
1157 __ Call(callable.code(), RelocInfo::CODE_TARGET);
1154 RestoreContext(); 1158 RestoreContext();
1155 } 1159 }
1156 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); 1160 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER);
1157 1161
1158 // If result_saved is true the result is on top of the stack. If 1162 // If result_saved is true the result is on top of the stack. If
1159 // result_saved is false the result is in r2. 1163 // result_saved is false the result is in r2.
1160 bool result_saved = false; 1164 bool result_saved = false;
1161 1165
1162 AccessorTable accessor_table(zone()); 1166 AccessorTable accessor_table(zone());
1163 for (int i = 0; i < expr->properties()->length(); i++) { 1167 for (int i = 0; i < expr->properties()->length(); i++) {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 } 1281 }
1278 1282
1279 __ LoadP(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1283 __ LoadP(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1280 __ LoadSmiLiteral(r4, Smi::FromInt(expr->literal_index())); 1284 __ LoadSmiLiteral(r4, Smi::FromInt(expr->literal_index()));
1281 __ mov(r3, Operand(constant_elements)); 1285 __ mov(r3, Operand(constant_elements));
1282 if (MustCreateArrayLiteralWithRuntime(expr)) { 1286 if (MustCreateArrayLiteralWithRuntime(expr)) {
1283 __ LoadSmiLiteral(r2, Smi::FromInt(expr->ComputeFlags())); 1287 __ LoadSmiLiteral(r2, Smi::FromInt(expr->ComputeFlags()));
1284 __ Push(r5, r4, r3, r2); 1288 __ Push(r5, r4, r3, r2);
1285 __ CallRuntime(Runtime::kCreateArrayLiteral); 1289 __ CallRuntime(Runtime::kCreateArrayLiteral);
1286 } else { 1290 } else {
1287 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); 1291 Callable callable =
1288 __ CallStub(&stub); 1292 CodeFactory::FastCloneShallowArray(isolate(), allocation_site_mode);
1293 __ Call(callable.code(), RelocInfo::CODE_TARGET);
1289 RestoreContext(); 1294 RestoreContext();
1290 } 1295 }
1291 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); 1296 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER);
1292 1297
1293 bool result_saved = false; // Is the result saved to the stack? 1298 bool result_saved = false; // Is the result saved to the stack?
1294 ZoneList<Expression*>* subexprs = expr->values(); 1299 ZoneList<Expression*>* subexprs = expr->values();
1295 int length = subexprs->length(); 1300 int length = subexprs->length();
1296 1301
1297 // Emit code to evaluate all the non-constant subexpressions and to store 1302 // Emit code to evaluate all the non-constant subexpressions and to store
1298 // them into the newly cloned array. 1303 // them into the newly cloned array.
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
2794 DCHECK(kOSRBranchInstruction == br_instr); 2799 DCHECK(kOSRBranchInstruction == br_instr);
2795 2800
2796 DCHECK(interrupt_address == 2801 DCHECK(interrupt_address ==
2797 isolate->builtins()->OnStackReplacement()->entry()); 2802 isolate->builtins()->OnStackReplacement()->entry());
2798 return ON_STACK_REPLACEMENT; 2803 return ON_STACK_REPLACEMENT;
2799 } 2804 }
2800 2805
2801 } // namespace internal 2806 } // namespace internal
2802 } // namespace v8 2807 } // namespace v8
2803 #endif // V8_TARGET_ARCH_S390 2808 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698