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

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

Issue 7216004: MIPS: port Merge arguments branch to bleeding edge (second try). (Closed)
Patch Set: Simplify one conditional. Created 9 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 | « no previous file | src/mips/full-codegen-mips.cc » ('j') | src/mips/ic-mips.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4057 matching lines...) Expand 10 before | Expand all | Expand 10 after
4068 __ Ret(); 4068 __ Ret();
4069 4069
4070 // Slow-case: Handle non-smi or out-of-bounds access to arguments 4070 // Slow-case: Handle non-smi or out-of-bounds access to arguments
4071 // by calling the runtime system. 4071 // by calling the runtime system.
4072 __ bind(&slow); 4072 __ bind(&slow);
4073 __ push(a1); 4073 __ push(a1);
4074 __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1); 4074 __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1);
4075 } 4075 }
4076 4076
4077 4077
4078 void ArgumentsAccessStub::GenerateNewObject(MacroAssembler* masm) { 4078 void ArgumentsAccessStub::GenerateNewNonStrictSlow(MacroAssembler* masm) {
4079 // sp[0] : number of parameters 4079 // sp[0] : number of parameters
4080 // sp[4] : receiver displacement 4080 // sp[4] : receiver displacement
4081 // sp[8] : function 4081 // sp[8] : function
4082 4082 // Check if the calling frame is an arguments adaptor frame.
4083 Label runtime;
4084 __ lw(a3, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
4085 __ lw(a2, MemOperand(a3, StandardFrameConstants::kContextOffset));
4086 __ Branch(&runtime, ne,
4087 a2, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
4088
4089 // Patch the arguments.length and the parameters pointer in the current frame.
4090 __ lw(a2, MemOperand(a3, ArgumentsAdaptorFrameConstants::kLengthOffset));
4091 __ sw(a2, MemOperand(sp, 0 * kPointerSize));
4092 __ sll(t3, a2, 1);
4093 __ Addu(a3, a3, Operand(t3));
4094 __ addiu(a3, a3, StandardFrameConstants::kCallerSPOffset);
4095 __ sw(a3, MemOperand(sp, 1 * kPointerSize));
4096
4097 __ bind(&runtime);
4098 __ TailCallRuntime(Runtime::kNewArgumentsFast, 3, 1);
4099 }
4100
4101
4102 void ArgumentsAccessStub::GenerateNewNonStrictFast(MacroAssembler* masm) {
4103 // Stack layout:
4104 // sp[0] : number of parameters (tagged)
4105 // sp[4] : address of receiver argument
4106 // sp[8] : function
4107 // Registers used over whole function:
4108 // t2 : allocated object (tagged)
4109 // t5 : mapped parameter count (tagged)
4110
4111 __ lw(a1, MemOperand(sp, 0 * kPointerSize));
4112 // a1 = parameter count (tagged)
4113
4114 // Check if the calling frame is an arguments adaptor frame.
4115 Label runtime;
4116 Label adaptor_frame, try_allocate;
4117 __ lw(a3, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
4118 __ lw(a2, MemOperand(a3, StandardFrameConstants::kContextOffset));
4119 __ Branch(&adaptor_frame, eq, a2,
4120 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
4121
4122 // No adaptor, parameter count = argument count.
4123 __ mov(a2, a1);
4124 __ b(&try_allocate);
Søren Thygesen Gjesse 2011/06/21 07:46:40 Is there no unconditional Branch macro which autom
4125 __ nop(); // Branch delay slot nop.
4126
4127 // We have an adaptor frame. Patch the parameters pointer.
4128 __ bind(&adaptor_frame);
4129 __ lw(a2, MemOperand(a3, ArgumentsAdaptorFrameConstants::kLengthOffset));
4130 __ sll(t6, a2, 1);
4131 __ Addu(a3, a3, Operand(t6));
4132 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset));
4133 __ sw(a3, MemOperand(sp, 1 * kPointerSize));
4134
4135 // a1 = parameter count (tagged)
4136 // a2 = argument count (tagged)
4137 // Compute the mapped parameter count = min(a1, a2) in a1.
4138 Label skip_min;
4139 __ Branch(&skip_min, lt, a1, Operand(a2));
4140 __ mov(a1, a2);
4141 __ bind(&skip_min);
4142
4143 __ bind(&try_allocate);
4144
4145 // Compute the sizes of backing store, parameter map, and arguments object.
4146 // 1. Parameter map, has 2 extra words containing context and backing store.
4147 const int kParameterMapHeaderSize =
4148 FixedArray::kHeaderSize + 2 * kPointerSize;
4149 // If there are no mapped parameters, we do not need the parameter_map.
4150 Label param_map_size;
4151 ASSERT_EQ(0, Smi::FromInt(0));
4152 __ Branch(USE_DELAY_SLOT, &param_map_size, eq, a1, Operand(zero_reg));
4153 __ mov(t5, zero_reg); // In delay slot: param map size = 0 when a1 == 0.
4154 __ sll(t5, a1, 1);
4155 __ addiu(t5, t5, kParameterMapHeaderSize);
4156 __ bind(&param_map_size);
4157
4158 // 2. Backing store.
4159 __ sll(t6, a2, 1);
4160 __ Addu(t5, t5, Operand(t6));
4161 __ Addu(t5, t5, Operand(FixedArray::kHeaderSize));
4162
4163 // 3. Arguments object.
4164 __ Addu(t5, t5, Operand(Heap::kArgumentsObjectSize));
4165
4166 // Do the allocation of all three objects in one go.
4167 __ AllocateInNewSpace(t5, v0, a3, t0, &runtime, TAG_OBJECT);
4168
4169 // v0 = address of new object(s) (tagged)
4170 // a2 = argument count (tagged)
4171 // Get the arguments boilerplate from the current (global) context into t0.
4172 const int kNormalOffset =
4173 Context::SlotOffset(Context::ARGUMENTS_BOILERPLATE_INDEX);
4174 const int kAliasedOffset =
4175 Context::SlotOffset(Context::ALIASED_ARGUMENTS_BOILERPLATE_INDEX);
4176
4177 __ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
4178 __ lw(t0, FieldMemOperand(t0, GlobalObject::kGlobalContextOffset));
4179 Label skip2_ne, skip2_eq;
4180 __ Branch(&skip2_ne, ne, a1, Operand(zero_reg));
4181 __ lw(t0, MemOperand(t0, kNormalOffset));
4182 __ bind(&skip2_ne);
4183
4184 __ Branch(&skip2_eq, eq, a1, Operand(zero_reg));
4185 __ lw(t0, MemOperand(t0, kAliasedOffset));
4186 __ bind(&skip2_eq);
4187
4188 // v0 = address of new object (tagged)
4189 // a1 = mapped parameter count (tagged)
4190 // a2 = argument count (tagged)
4191 // t0 = address of boilerplate object (tagged)
4192 // Copy the JS object part.
4193 for (int i = 0; i < JSObject::kHeaderSize; i += kPointerSize) {
4194 __ lw(a3, FieldMemOperand(t0, i));
4195 __ sw(a3, FieldMemOperand(v0, i));
4196 }
4197
4198 // Setup the callee in-object property.
4199 STATIC_ASSERT(Heap::kArgumentsCalleeIndex == 1);
4200 __ lw(a3, MemOperand(sp, 2 * kPointerSize));
4201 const int kCalleeOffset = JSObject::kHeaderSize +
4202 Heap::kArgumentsCalleeIndex * kPointerSize;
4203 __ sw(a3, FieldMemOperand(v0, kCalleeOffset));
4204
4205 // Use the length (smi tagged) and set that as an in-object property too.
4206 STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0);
4207 const int kLengthOffset = JSObject::kHeaderSize +
4208 Heap::kArgumentsLengthIndex * kPointerSize;
4209 __ sw(a2, FieldMemOperand(v0, kLengthOffset));
4210
4211 // Setup the elements pointer in the allocated arguments object.
4212 // If we allocated a parameter map, t0 will point there, otherwise
4213 // it will point to the backing store.
4214 __ Addu(t0, v0, Operand(Heap::kArgumentsObjectSize));
4215 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset));
4216
4217 // v0 = address of new object (tagged)
4218 // a1 = mapped parameter count (tagged)
4219 // a2 = argument count (tagged)
4220 // t0 = address of parameter map or backing store (tagged)
4221 // Initialize parameter map. If there are no mapped arguments, we're done.
4222 Label skip_parameter_map;
4223 Label skip3;
4224 __ Branch(&skip3, ne, a1, Operand(Smi::FromInt(0)));
4225 // Move backing store address to a3, because it is
4226 // expected there when filling in the unmapped arguments.
4227 __ mov(a3, t0);
4228 __ bind(&skip3);
4229
4230 __ Branch(&skip_parameter_map, eq, a1, Operand(Smi::FromInt(0)));
4231
4232 __ LoadRoot(t2, Heap::kNonStrictArgumentsElementsMapRootIndex);
4233 __ sw(t2, FieldMemOperand(t0, FixedArray::kMapOffset));
4234 __ Addu(t2, a1, Operand(Smi::FromInt(2)));
4235 __ sw(t2, FieldMemOperand(t0, FixedArray::kLengthOffset));
4236 __ sw(cp, FieldMemOperand(t0, FixedArray::kHeaderSize + 0 * kPointerSize));
4237 __ sll(t6, a1, 1);
4238 __ Addu(t2, t0, Operand(t6));
4239 __ Addu(t2, t2, Operand(kParameterMapHeaderSize));
4240 __ sw(t2, FieldMemOperand(t0, FixedArray::kHeaderSize + 1 * kPointerSize));
4241
4242 // Copy the parameter slots and the holes in the arguments.
4243 // We need to fill in mapped_parameter_count slots. They index the context,
4244 // where parameters are stored in reverse order, at
4245 // MIN_CONTEXT_SLOTS .. MIN_CONTEXT_SLOTS+parameter_count-1
4246 // The mapped parameter thus need to get indices
4247 // MIN_CONTEXT_SLOTS+parameter_count-1 ..
4248 // MIN_CONTEXT_SLOTS+parameter_count-mapped_parameter_count
4249 // We loop from right to left.
4250 Label parameters_loop, parameters_test;
4251 __ mov(t2, a1);
4252 __ lw(t5, MemOperand(sp, 0 * kPointerSize));
4253 __ Addu(t5, t5, Operand(Smi::FromInt(Context::MIN_CONTEXT_SLOTS)));
4254 __ Subu(t5, t5, Operand(a1));
4255 __ LoadRoot(t3, Heap::kTheHoleValueRootIndex);
4256 __ sll(t6, t2, 1);
4257 __ Addu(a3, t0, Operand(t6));
4258 __ Addu(a3, a3, Operand(kParameterMapHeaderSize));
4259
4260 // t2 = loop variable (tagged)
4261 // a1 = mapping index (tagged)
4262 // a3 = address of backing store (tagged)
4263 // t0 = address of parameter map (tagged)
4264 // t1 = temporary scratch (a.o., for address calculation)
4265 // t3 = the hole value
4266 __ jmp(&parameters_test);
4267
4268 __ bind(&parameters_loop);
4269 __ Subu(t2, t2, Operand(Smi::FromInt(1)));
4270 __ sll(t1, t2, 1);
4271 __ Addu(t1, t1, Operand(kParameterMapHeaderSize - kHeapObjectTag));
4272 __ Addu(t6, t0, t1);
4273 __ sw(t5, MemOperand(t6));
4274 __ Subu(t1, t1, Operand(kParameterMapHeaderSize - FixedArray::kHeaderSize));
4275 __ Addu(t6, a3, t1);
4276 __ sw(t3, MemOperand(t6));
4277 __ Addu(t5, t5, Operand(Smi::FromInt(1)));
4278 __ bind(&parameters_test);
4279 __ Branch(&parameters_loop, ne, t2, Operand(Smi::FromInt(0)));
4280
4281 __ bind(&skip_parameter_map);
4282 // a2 = argument count (tagged)
4283 // a3 = address of backing store (tagged)
4284 // t1 = scratch
4285 // Copy arguments header and remaining slots (if there are any).
4286 __ LoadRoot(t1, Heap::kFixedArrayMapRootIndex);
4287 __ sw(t1, FieldMemOperand(a3, FixedArray::kMapOffset));
4288 __ sw(a2, FieldMemOperand(a3, FixedArray::kLengthOffset));
4289
4290 Label arguments_loop, arguments_test;
4291 __ mov(t5, a1);
4292 __ lw(t0, MemOperand(sp, 1 * kPointerSize));
4293 __ sll(t6, t5, 1);
4294 __ Subu(t0, t0, Operand(t6));
4295 __ jmp(&arguments_test);
4296
4297 __ bind(&arguments_loop);
4298 __ Subu(t0, t0, Operand(kPointerSize));
4299 __ lw(t2, MemOperand(t0, 0));
4300 __ sll(t6, t5, 1);
4301 __ Addu(t1, a3, Operand(t6));
4302 __ sw(t2, FieldMemOperand(t1, FixedArray::kHeaderSize));
4303 __ Addu(t5, t5, Operand(Smi::FromInt(1)));
4304
4305 __ bind(&arguments_test);
4306 __ Branch(&arguments_loop, lt, t5, Operand(a2));
4307
4308 // Return and remove the on-stack parameters.
4309 __ Addu(sp, sp, Operand(3 * kPointerSize));
4310 __ Ret();
4311
4312 // Do the runtime call to allocate the arguments object.
4313 // a2 = argument count (taggged)
4314 __ bind(&runtime);
4315 __ sw(a2, MemOperand(sp, 0 * kPointerSize)); // Patch argument count.
4316 __ TailCallRuntime(Runtime::kNewArgumentsFast, 3, 1);
4317 }
4318
4319
4320 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
4321 // sp[0] : number of parameters
4322 // sp[4] : receiver displacement
4323 // sp[8] : function
4083 // Check if the calling frame is an arguments adaptor frame. 4324 // Check if the calling frame is an arguments adaptor frame.
4084 Label adaptor_frame, try_allocate, runtime; 4325 Label adaptor_frame, try_allocate, runtime;
4085 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 4326 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
4086 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); 4327 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset));
4087 __ Branch(&adaptor_frame, 4328 __ Branch(&adaptor_frame,
4088 eq, 4329 eq,
4089 a3, 4330 a3,
4090 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 4331 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
4091 4332
4092 // Get the length from the frame. 4333 // Get the length from the frame.
(...skipping 12 matching lines...) Expand all
4105 4346
4106 // Try the new space allocation. Start out with computing the size 4347 // Try the new space allocation. Start out with computing the size
4107 // of the arguments object and the elements array in words. 4348 // of the arguments object and the elements array in words.
4108 Label add_arguments_object; 4349 Label add_arguments_object;
4109 __ bind(&try_allocate); 4350 __ bind(&try_allocate);
4110 __ Branch(&add_arguments_object, eq, a1, Operand(zero_reg)); 4351 __ Branch(&add_arguments_object, eq, a1, Operand(zero_reg));
4111 __ srl(a1, a1, kSmiTagSize); 4352 __ srl(a1, a1, kSmiTagSize);
4112 4353
4113 __ Addu(a1, a1, Operand(FixedArray::kHeaderSize / kPointerSize)); 4354 __ Addu(a1, a1, Operand(FixedArray::kHeaderSize / kPointerSize));
4114 __ bind(&add_arguments_object); 4355 __ bind(&add_arguments_object);
4115 __ Addu(a1, a1, Operand(GetArgumentsObjectSize() / kPointerSize)); 4356 __ Addu(a1, a1, Operand(Heap::kArgumentsObjectSizeStrict / kPointerSize));
4116 4357
4117 // Do the allocation of both objects in one go. 4358 // Do the allocation of both objects in one go.
4118 __ AllocateInNewSpace( 4359 __ AllocateInNewSpace(a1,
4119 a1, 4360 v0,
4120 v0, 4361 a2,
4121 a2, 4362 a3,
4122 a3, 4363 &runtime,
4123 &runtime, 4364 static_cast<AllocationFlags>(TAG_OBJECT |
4124 static_cast<AllocationFlags>(TAG_OBJECT | SIZE_IN_WORDS)); 4365 SIZE_IN_WORDS));
4125 4366
4126 // Get the arguments boilerplate from the current (global) context. 4367 // Get the arguments boilerplate from the current (global) context.
4127 __ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 4368 __ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
4128 __ lw(t0, FieldMemOperand(t0, GlobalObject::kGlobalContextOffset)); 4369 __ lw(t0, FieldMemOperand(t0, GlobalObject::kGlobalContextOffset));
4129 __ lw(t0, MemOperand(t0, 4370 __ lw(t0, MemOperand(t0, Context::SlotOffset(
4130 Context::SlotOffset(GetArgumentsBoilerplateIndex()))); 4371 Context::STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX)));
4131 4372
4132 // Copy the JS object part. 4373 // Copy the JS object part.
4133 __ CopyFields(v0, t0, a3.bit(), JSObject::kHeaderSize / kPointerSize); 4374 __ CopyFields(v0, t0, a3.bit(), JSObject::kHeaderSize / kPointerSize);
4134 4375
4135 if (type_ == NEW_NON_STRICT) {
4136 // Setup the callee in-object property.
4137 STATIC_ASSERT(Heap::kArgumentsCalleeIndex == 1);
4138 __ lw(a3, MemOperand(sp, 2 * kPointerSize));
4139 const int kCalleeOffset = JSObject::kHeaderSize +
4140 Heap::kArgumentsCalleeIndex * kPointerSize;
4141 __ sw(a3, FieldMemOperand(v0, kCalleeOffset));
4142 }
4143
4144 // Get the length (smi tagged) and set that as an in-object property too. 4376 // Get the length (smi tagged) and set that as an in-object property too.
4145 STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0); 4377 STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0);
4146 __ lw(a1, MemOperand(sp, 0 * kPointerSize)); 4378 __ lw(a1, MemOperand(sp, 0 * kPointerSize));
4147 __ sw(a1, FieldMemOperand(v0, JSObject::kHeaderSize + 4379 __ sw(a1, FieldMemOperand(v0, JSObject::kHeaderSize +
4148 Heap::kArgumentsLengthIndex * kPointerSize)); 4380 Heap::kArgumentsLengthIndex * kPointerSize));
4149 4381
4150 Label done; 4382 Label done;
4151 __ Branch(&done, eq, a1, Operand(zero_reg)); 4383 __ Branch(&done, eq, a1, Operand(zero_reg));
4152 4384
4153 // Get the parameters pointer from the stack. 4385 // Get the parameters pointer from the stack.
4154 __ lw(a2, MemOperand(sp, 1 * kPointerSize)); 4386 __ lw(a2, MemOperand(sp, 1 * kPointerSize));
4155 4387
4156 // Setup the elements pointer in the allocated arguments object and 4388 // Setup the elements pointer in the allocated arguments object and
4157 // initialize the header in the elements fixed array. 4389 // initialize the header in the elements fixed array.
4158 __ Addu(t0, v0, Operand(GetArgumentsObjectSize())); 4390 __ Addu(t0, v0, Operand(Heap::kArgumentsObjectSizeStrict));
4159 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset)); 4391 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset));
4160 __ LoadRoot(a3, Heap::kFixedArrayMapRootIndex); 4392 __ LoadRoot(a3, Heap::kFixedArrayMapRootIndex);
4161 __ sw(a3, FieldMemOperand(t0, FixedArray::kMapOffset)); 4393 __ sw(a3, FieldMemOperand(t0, FixedArray::kMapOffset));
4162 __ sw(a1, FieldMemOperand(t0, FixedArray::kLengthOffset)); 4394 __ sw(a1, FieldMemOperand(t0, FixedArray::kLengthOffset));
4163 __ srl(a1, a1, kSmiTagSize); // Untag the length for the loop. 4395 // Untag the length for the loop.
4396 __ srl(a1, a1, kSmiTagSize);
4164 4397
4165 // Copy the fixed array slots. 4398 // Copy the fixed array slots.
4166 Label loop; 4399 Label loop;
4167 // Setup t0 to point to the first array slot. 4400 // Setup t0 to point to the first array slot.
4168 __ Addu(t0, t0, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 4401 __ Addu(t0, t0, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
4169 __ bind(&loop); 4402 __ bind(&loop);
4170 // Pre-decrement a2 with kPointerSize on each iteration. 4403 // Pre-decrement a2 with kPointerSize on each iteration.
4171 // Pre-decrement in order to skip receiver. 4404 // Pre-decrement in order to skip receiver.
4172 __ Addu(a2, a2, Operand(-kPointerSize)); 4405 __ Addu(a2, a2, Operand(-kPointerSize));
4173 __ lw(a3, MemOperand(a2)); 4406 __ lw(a3, MemOperand(a2));
4174 // Post-increment t0 with kPointerSize on each iteration. 4407 // Post-increment t0 with kPointerSize on each iteration.
4175 __ sw(a3, MemOperand(t0)); 4408 __ sw(a3, MemOperand(t0));
4176 __ Addu(t0, t0, Operand(kPointerSize)); 4409 __ Addu(t0, t0, Operand(kPointerSize));
4177 __ Subu(a1, a1, Operand(1)); 4410 __ Subu(a1, a1, Operand(1));
4178 __ Branch(&loop, ne, a1, Operand(zero_reg)); 4411 __ Branch(&loop, ne, a1, Operand(zero_reg));
4179 4412
4180 // Return and remove the on-stack parameters. 4413 // Return and remove the on-stack parameters.
4181 __ bind(&done); 4414 __ bind(&done);
4182 __ Addu(sp, sp, Operand(3 * kPointerSize)); 4415 __ Addu(sp, sp, Operand(3 * kPointerSize));
4183 __ Ret(); 4416 __ Ret();
4184 4417
4185 // Do the runtime call to allocate the arguments object. 4418 // Do the runtime call to allocate the arguments object.
4186 __ bind(&runtime); 4419 __ bind(&runtime);
4187 __ TailCallRuntime(Runtime::kNewArgumentsFast, 3, 1); 4420 __ TailCallRuntime(Runtime::kNewStrictArgumentsFast, 3, 1);
4188 } 4421 }
4189 4422
4190 4423
4191 void RegExpExecStub::Generate(MacroAssembler* masm) { 4424 void RegExpExecStub::Generate(MacroAssembler* masm) {
4192 // Just jump directly to runtime if native RegExp is not selected at compile 4425 // Just jump directly to runtime if native RegExp is not selected at compile
4193 // time or if regexp entry in generated code is turned off runtime switch or 4426 // time or if regexp entry in generated code is turned off runtime switch or
4194 // at compilation. 4427 // at compilation.
4195 #ifdef V8_INTERPRETED_REGEXP 4428 #ifdef V8_INTERPRETED_REGEXP
4196 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); 4429 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
4197 #else // V8_INTERPRETED_REGEXP 4430 #else // V8_INTERPRETED_REGEXP
(...skipping 2456 matching lines...) Expand 10 before | Expand all | Expand 10 after
6654 __ mov(result, zero_reg); 6887 __ mov(result, zero_reg);
6655 __ Ret(); 6888 __ Ret();
6656 } 6889 }
6657 6890
6658 6891
6659 #undef __ 6892 #undef __
6660 6893
6661 } } // namespace v8::internal 6894 } } // namespace v8::internal
6662 6895
6663 #endif // V8_TARGET_ARCH_MIPS 6896 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/full-codegen-mips.cc » ('j') | src/mips/ic-mips.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698