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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 1152093003: [strong] create strong array literals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback Created 5 years, 6 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/globals.h ('k') | src/ia32/full-codegen-ia32.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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 __ ret(3 * kPointerSize); 1156 __ ret(3 * kPointerSize);
1157 1157
1158 // Do the runtime call to allocate the arguments object. 1158 // Do the runtime call to allocate the arguments object.
1159 __ bind(&runtime); 1159 __ bind(&runtime);
1160 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); 1160 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
1161 } 1161 }
1162 1162
1163 1163
1164 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { 1164 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
1165 // esp[0] : return address 1165 // esp[0] : return address
1166 // esp[4] : index of rest parameter 1166 // esp[4] : language mode
1167 // esp[8] : number of parameters 1167 // esp[8] : index of rest parameter
1168 // esp[12] : receiver displacement 1168 // esp[12] : number of parameters
1169 // esp[16] : receiver displacement
1169 1170
1170 // Check if the calling frame is an arguments adaptor frame. 1171 // Check if the calling frame is an arguments adaptor frame.
1171 Label runtime; 1172 Label runtime;
1172 __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); 1173 __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
1173 __ mov(ecx, Operand(edx, StandardFrameConstants::kContextOffset)); 1174 __ mov(ecx, Operand(edx, StandardFrameConstants::kContextOffset));
1174 __ cmp(ecx, Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 1175 __ cmp(ecx, Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
1175 __ j(not_equal, &runtime); 1176 __ j(not_equal, &runtime);
1176 1177
1177 // Patch the arguments.length and the parameters pointer. 1178 // Patch the arguments.length and the parameters pointer.
1178 __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); 1179 __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset));
1179 __ mov(Operand(esp, 2 * kPointerSize), ecx); 1180 __ mov(Operand(esp, 3 * kPointerSize), ecx);
1180 __ lea(edx, Operand(edx, ecx, times_2, 1181 __ lea(edx, Operand(edx, ecx, times_2,
1181 StandardFrameConstants::kCallerSPOffset)); 1182 StandardFrameConstants::kCallerSPOffset));
1182 __ mov(Operand(esp, 3 * kPointerSize), edx); 1183 __ mov(Operand(esp, 4 * kPointerSize), edx);
1183 1184
1184 __ bind(&runtime); 1185 __ bind(&runtime);
1185 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); 1186 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
1186 } 1187 }
1187 1188
1188 1189
1189 void RegExpExecStub::Generate(MacroAssembler* masm) { 1190 void RegExpExecStub::Generate(MacroAssembler* masm) {
1190 // Just jump directly to runtime if native RegExp is not selected at compile 1191 // Just jump directly to runtime if native RegExp is not selected at compile
1191 // time or if regexp entry in generated code is turned off runtime switch or 1192 // time or if regexp entry in generated code is turned off runtime switch or
1192 // at compilation. 1193 // at compilation.
1193 #ifdef V8_INTERPRETED_REGEXP 1194 #ifdef V8_INTERPRETED_REGEXP
1194 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); 1195 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
1195 #else // V8_INTERPRETED_REGEXP 1196 #else // V8_INTERPRETED_REGEXP
(...skipping 4279 matching lines...) Expand 10 before | Expand all | Expand 10 after
5475 ApiParameterOperand(2), kStackSpace, nullptr, 5476 ApiParameterOperand(2), kStackSpace, nullptr,
5476 Operand(ebp, 7 * kPointerSize), NULL); 5477 Operand(ebp, 7 * kPointerSize), NULL);
5477 } 5478 }
5478 5479
5479 5480
5480 #undef __ 5481 #undef __
5481 5482
5482 } } // namespace v8::internal 5483 } } // namespace v8::internal
5483 5484
5484 #endif // V8_TARGET_ARCH_IA32 5485 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698