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

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

Issue 2605893002: [builtins] More stubs to the builtin-o-sphere. (Closed)
Patch Set: Fixed compile error. 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
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_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins/builtins-constructor.h" 9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1142 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1143 __ push(Immediate(Smi::FromInt(expr->literal_index()))); 1143 __ push(Immediate(Smi::FromInt(expr->literal_index())));
1144 __ push(Immediate(constant_properties)); 1144 __ push(Immediate(constant_properties));
1145 __ push(Immediate(Smi::FromInt(flags))); 1145 __ push(Immediate(Smi::FromInt(flags)));
1146 __ CallRuntime(Runtime::kCreateObjectLiteral); 1146 __ CallRuntime(Runtime::kCreateObjectLiteral);
1147 } else { 1147 } else {
1148 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1148 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1149 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); 1149 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
1150 __ mov(ecx, Immediate(constant_properties)); 1150 __ mov(ecx, Immediate(constant_properties));
1151 __ mov(edx, Immediate(Smi::FromInt(flags))); 1151 __ mov(edx, Immediate(Smi::FromInt(flags)));
1152 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); 1152 Callable callable = CodeFactory::FastCloneShallowObject(
1153 __ CallStub(&stub); 1153 isolate(), expr->properties_count());
1154 __ Call(callable.code(), RelocInfo::CODE_TARGET);
1154 RestoreContext(); 1155 RestoreContext();
1155 } 1156 }
1156 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); 1157 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER);
1157 1158
1158 // If result_saved is true the result is on top of the stack. If 1159 // If result_saved is true the result is on top of the stack. If
1159 // result_saved is false the result is in eax. 1160 // result_saved is false the result is in eax.
1160 bool result_saved = false; 1161 bool result_saved = false;
1161 1162
1162 AccessorTable accessor_table(zone()); 1163 AccessorTable accessor_table(zone());
1163 for (int i = 0; i < expr->properties()->length(); i++) { 1164 for (int i = 0; i < expr->properties()->length(); i++) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 if (MustCreateArrayLiteralWithRuntime(expr)) { 1276 if (MustCreateArrayLiteralWithRuntime(expr)) {
1276 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1277 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1277 __ push(Immediate(Smi::FromInt(expr->literal_index()))); 1278 __ push(Immediate(Smi::FromInt(expr->literal_index())));
1278 __ push(Immediate(constant_elements)); 1279 __ push(Immediate(constant_elements));
1279 __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); 1280 __ push(Immediate(Smi::FromInt(expr->ComputeFlags())));
1280 __ CallRuntime(Runtime::kCreateArrayLiteral); 1281 __ CallRuntime(Runtime::kCreateArrayLiteral);
1281 } else { 1282 } else {
1282 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1283 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1283 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); 1284 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
1284 __ mov(ecx, Immediate(constant_elements)); 1285 __ mov(ecx, Immediate(constant_elements));
1285 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); 1286 Callable callable =
1286 __ CallStub(&stub); 1287 CodeFactory::FastCloneShallowArray(isolate(), allocation_site_mode);
1288 __ Call(callable.code(), RelocInfo::CODE_TARGET);
1287 RestoreContext(); 1289 RestoreContext();
1288 } 1290 }
1289 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); 1291 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER);
1290 1292
1291 bool result_saved = false; // Is the result saved to the stack? 1293 bool result_saved = false; // Is the result saved to the stack?
1292 ZoneList<Expression*>* subexprs = expr->values(); 1294 ZoneList<Expression*>* subexprs = expr->values();
1293 int length = subexprs->length(); 1295 int length = subexprs->length();
1294 1296
1295 // Emit code to evaluate all the non-constant subexpressions and to store 1297 // Emit code to evaluate all the non-constant subexpressions and to store
1296 // them into the newly cloned array. 1298 // them into the newly cloned array.
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 isolate->builtins()->OnStackReplacement()->entry(), 2794 isolate->builtins()->OnStackReplacement()->entry(),
2793 Assembler::target_address_at(call_target_address, unoptimized_code)); 2795 Assembler::target_address_at(call_target_address, unoptimized_code));
2794 return ON_STACK_REPLACEMENT; 2796 return ON_STACK_REPLACEMENT;
2795 } 2797 }
2796 2798
2797 2799
2798 } // namespace internal 2800 } // namespace internal
2799 } // namespace v8 2801 } // namespace v8
2800 2802
2801 #endif // V8_TARGET_ARCH_IA32 2803 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698