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

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

Issue 2607383002: X87: [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 | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1131 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1132 __ push(Immediate(Smi::FromInt(expr->literal_index()))); 1132 __ push(Immediate(Smi::FromInt(expr->literal_index())));
1133 __ push(Immediate(constant_properties)); 1133 __ push(Immediate(constant_properties));
1134 __ push(Immediate(Smi::FromInt(flags))); 1134 __ push(Immediate(Smi::FromInt(flags)));
1135 __ CallRuntime(Runtime::kCreateObjectLiteral); 1135 __ CallRuntime(Runtime::kCreateObjectLiteral);
1136 } else { 1136 } else {
1137 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1137 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1138 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); 1138 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
1139 __ mov(ecx, Immediate(constant_properties)); 1139 __ mov(ecx, Immediate(constant_properties));
1140 __ mov(edx, Immediate(Smi::FromInt(flags))); 1140 __ mov(edx, Immediate(Smi::FromInt(flags)));
1141 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); 1141 Callable callable = CodeFactory::FastCloneShallowObject(
1142 __ CallStub(&stub); 1142 isolate(), expr->properties_count());
1143 __ Call(callable.code(), RelocInfo::CODE_TARGET);
1143 RestoreContext(); 1144 RestoreContext();
1144 } 1145 }
1145 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); 1146 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER);
1146 1147
1147 // If result_saved is true the result is on top of the stack. If 1148 // If result_saved is true the result is on top of the stack. If
1148 // result_saved is false the result is in eax. 1149 // result_saved is false the result is in eax.
1149 bool result_saved = false; 1150 bool result_saved = false;
1150 1151
1151 AccessorTable accessor_table(zone()); 1152 AccessorTable accessor_table(zone());
1152 for (int i = 0; i < expr->properties()->length(); i++) { 1153 for (int i = 0; i < expr->properties()->length(); i++) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 if (MustCreateArrayLiteralWithRuntime(expr)) { 1265 if (MustCreateArrayLiteralWithRuntime(expr)) {
1265 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1266 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1266 __ push(Immediate(Smi::FromInt(expr->literal_index()))); 1267 __ push(Immediate(Smi::FromInt(expr->literal_index())));
1267 __ push(Immediate(constant_elements)); 1268 __ push(Immediate(constant_elements));
1268 __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); 1269 __ push(Immediate(Smi::FromInt(expr->ComputeFlags())));
1269 __ CallRuntime(Runtime::kCreateArrayLiteral); 1270 __ CallRuntime(Runtime::kCreateArrayLiteral);
1270 } else { 1271 } else {
1271 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1272 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1272 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); 1273 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
1273 __ mov(ecx, Immediate(constant_elements)); 1274 __ mov(ecx, Immediate(constant_elements));
1274 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); 1275 Callable callable =
1275 __ CallStub(&stub); 1276 CodeFactory::FastCloneShallowArray(isolate(), allocation_site_mode);
1277 __ Call(callable.code(), RelocInfo::CODE_TARGET);
1276 RestoreContext(); 1278 RestoreContext();
1277 } 1279 }
1278 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); 1280 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER);
1279 1281
1280 bool result_saved = false; // Is the result saved to the stack? 1282 bool result_saved = false; // Is the result saved to the stack?
1281 ZoneList<Expression*>* subexprs = expr->values(); 1283 ZoneList<Expression*>* subexprs = expr->values();
1282 int length = subexprs->length(); 1284 int length = subexprs->length();
1283 1285
1284 // Emit code to evaluate all the non-constant subexpressions and to store 1286 // Emit code to evaluate all the non-constant subexpressions and to store
1285 // them into the newly cloned array. 1287 // them into the newly cloned array.
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
2781 isolate->builtins()->OnStackReplacement()->entry(), 2783 isolate->builtins()->OnStackReplacement()->entry(),
2782 Assembler::target_address_at(call_target_address, unoptimized_code)); 2784 Assembler::target_address_at(call_target_address, unoptimized_code));
2783 return ON_STACK_REPLACEMENT; 2785 return ON_STACK_REPLACEMENT;
2784 } 2786 }
2785 2787
2786 2788
2787 } // namespace internal 2789 } // namespace internal
2788 } // namespace v8 2790 } // namespace v8
2789 2791
2790 #endif // V8_TARGET_ARCH_X87 2792 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698