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

Side by Side Diff: src/arm/builtins-arm.cc

Issue 2118283003: [builtins] Construct builtin frame in String/Number ctors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@20160630-tostringtag
Patch Set: Remove TODO Created 4 years, 5 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/arm/macro-assembler-arm.h » ('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 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // parameter to a number first using the ToNumber builtin if necessary. 159 // parameter to a number first using the ToNumber builtin if necessary.
160 Label convert, convert_smi, convert_number, done_convert; 160 Label convert, convert_smi, convert_number, done_convert;
161 __ bind(&convert); 161 __ bind(&convert);
162 __ JumpIfSmi(r2, &convert_smi); 162 __ JumpIfSmi(r2, &convert_smi);
163 __ ldr(r3, FieldMemOperand(r2, HeapObject::kMapOffset)); 163 __ ldr(r3, FieldMemOperand(r2, HeapObject::kMapOffset));
164 __ JumpIfRoot(r3, Heap::kHeapNumberMapRootIndex, &convert_number); 164 __ JumpIfRoot(r3, Heap::kHeapNumberMapRootIndex, &convert_number);
165 { 165 {
166 // Parameter is not a Number, use the ToNumber builtin to convert it. 166 // Parameter is not a Number, use the ToNumber builtin to convert it.
167 DCHECK(!FLAG_enable_embedded_constant_pool); 167 DCHECK(!FLAG_enable_embedded_constant_pool);
168 FrameScope scope(masm, StackFrame::MANUAL); 168 FrameScope scope(masm, StackFrame::MANUAL);
169 __ Push(lr, fp, cp, r1);
170 __ add(fp, sp, Operand(2 * kPointerSize));
171 __ SmiTag(r0); 169 __ SmiTag(r0);
172 __ SmiTag(r4); 170 __ SmiTag(r4);
173 __ Push(r0, r4, r5); 171 __ EnterBuiltinFrame(cp, r1, r0);
172 __ Push(r4, r5);
174 __ mov(r0, r2); 173 __ mov(r0, r2);
175 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); 174 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET);
176 __ mov(r2, r0); 175 __ mov(r2, r0);
177 __ Pop(r0, r4, r5); 176 __ Pop(r4, r5);
177 __ LeaveBuiltinFrame(cp, r1, r0);
178 __ SmiUntag(r4);
179 __ SmiUntag(r0);
178 { 180 {
179 // Restore the double accumulator value (d1). 181 // Restore the double accumulator value (d1).
180 Label done_restore; 182 Label done_restore;
181 __ SmiToDouble(d1, r5); 183 __ SmiToDouble(d1, r5);
182 __ JumpIfSmi(r5, &done_restore); 184 __ JumpIfSmi(r5, &done_restore);
183 __ vldr(d1, FieldMemOperand(r5, HeapNumber::kValueOffset)); 185 __ vldr(d1, FieldMemOperand(r5, HeapNumber::kValueOffset));
184 __ bind(&done_restore); 186 __ bind(&done_restore);
185 } 187 }
186 __ SmiUntag(r4);
187 __ SmiUntag(r0);
188 __ Pop(lr, fp, cp, r1);
189 } 188 }
190 __ b(&convert); 189 __ b(&convert);
191 __ bind(&convert_number); 190 __ bind(&convert_number);
192 __ vldr(d2, FieldMemOperand(r2, HeapNumber::kValueOffset)); 191 __ vldr(d2, FieldMemOperand(r2, HeapNumber::kValueOffset));
193 __ b(&done_convert); 192 __ b(&done_convert);
194 __ bind(&convert_smi); 193 __ bind(&convert_smi);
195 __ SmiToDouble(d2, r2); 194 __ SmiToDouble(d2, r2);
196 __ bind(&done_convert); 195 __ bind(&done_convert);
197 196
198 // Perform the actual comparison with the accumulator value on the left hand 197 // Perform the actual comparison with the accumulator value on the left hand
(...skipping 28 matching lines...) Expand all
227 __ Drop(r0); 226 __ Drop(r0);
228 __ mov(r0, r5); 227 __ mov(r0, r5);
229 __ Ret(); 228 __ Ret();
230 } 229 }
231 230
232 // static 231 // static
233 void Builtins::Generate_NumberConstructor(MacroAssembler* masm) { 232 void Builtins::Generate_NumberConstructor(MacroAssembler* masm) {
234 // ----------- S t a t e ------------- 233 // ----------- S t a t e -------------
235 // -- r0 : number of arguments 234 // -- r0 : number of arguments
236 // -- r1 : constructor function 235 // -- r1 : constructor function
236 // -- cp : context
237 // -- lr : return address 237 // -- lr : return address
238 // -- sp[(argc - n - 1) * 4] : arg[n] (zero based) 238 // -- sp[(argc - n - 1) * 4] : arg[n] (zero based)
239 // -- sp[argc * 4] : receiver 239 // -- sp[argc * 4] : receiver
240 // ----------------------------------- 240 // -----------------------------------
241 241
242 // 1. Load the first argument into r0 and get rid of the rest (including the 242 // 1. Load the first argument into r0.
243 // receiver).
244 Label no_arguments; 243 Label no_arguments;
245 { 244 {
245 __ mov(r2, r0); // Store argc in r2.
246 __ sub(r0, r0, Operand(1), SetCC); 246 __ sub(r0, r0, Operand(1), SetCC);
247 __ b(lo, &no_arguments); 247 __ b(lo, &no_arguments);
248 __ ldr(r0, MemOperand(sp, r0, LSL, kPointerSizeLog2, PreIndex)); 248 __ ldr(r0, MemOperand(sp, r0, LSL, kPointerSizeLog2));
249 __ Drop(2);
250 } 249 }
251 250
252 // 2a. Convert the first argument to a number. 251 // 2a. Convert the first argument to a number.
253 __ Jump(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); 252 {
253 FrameScope scope(masm, StackFrame::MANUAL);
254 __ SmiTag(r2);
255 __ EnterBuiltinFrame(cp, r1, r2);
256 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET);
257 __ LeaveBuiltinFrame(cp, r1, r2);
258 __ SmiUntag(r2);
259 }
260
261 {
262 // Drop all arguments including the receiver.
263 __ Drop(r2);
264 __ Ret(1);
265 }
254 266
255 // 2b. No arguments, return +0. 267 // 2b. No arguments, return +0.
256 __ bind(&no_arguments); 268 __ bind(&no_arguments);
257 __ Move(r0, Smi::FromInt(0)); 269 __ Move(r0, Smi::FromInt(0));
258 __ Ret(1); 270 __ Ret(1);
259 } 271 }
260 272
261 273
262 // static 274 // static
263 void Builtins::Generate_NumberConstructor_ConstructStub(MacroAssembler* masm) { 275 void Builtins::Generate_NumberConstructor_ConstructStub(MacroAssembler* masm) {
264 // ----------- S t a t e ------------- 276 // ----------- S t a t e -------------
265 // -- r0 : number of arguments 277 // -- r0 : number of arguments
266 // -- r1 : constructor function 278 // -- r1 : constructor function
267 // -- r3 : new target 279 // -- r3 : new target
280 // -- cp : context
268 // -- lr : return address 281 // -- lr : return address
269 // -- sp[(argc - n - 1) * 4] : arg[n] (zero based) 282 // -- sp[(argc - n - 1) * 4] : arg[n] (zero based)
270 // -- sp[argc * 4] : receiver 283 // -- sp[argc * 4] : receiver
271 // ----------------------------------- 284 // -----------------------------------
272 285
273 // 1. Make sure we operate in the context of the called function. 286 // 1. Make sure we operate in the context of the called function.
274 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); 287 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
275 288
276 // 2. Load the first argument into r2 and get rid of the rest (including the 289 // 2. Load the first argument into r2.
277 // receiver).
278 { 290 {
279 Label no_arguments, done; 291 Label no_arguments, done;
292 __ mov(r6, r0); // Store argc in r6.
280 __ sub(r0, r0, Operand(1), SetCC); 293 __ sub(r0, r0, Operand(1), SetCC);
281 __ b(lo, &no_arguments); 294 __ b(lo, &no_arguments);
282 __ ldr(r2, MemOperand(sp, r0, LSL, kPointerSizeLog2, PreIndex)); 295 __ ldr(r2, MemOperand(sp, r0, LSL, kPointerSizeLog2));
283 __ Drop(2);
284 __ b(&done); 296 __ b(&done);
285 __ bind(&no_arguments); 297 __ bind(&no_arguments);
286 __ Move(r2, Smi::FromInt(0)); 298 __ Move(r2, Smi::FromInt(0));
287 __ Drop(1);
288 __ bind(&done); 299 __ bind(&done);
289 } 300 }
290 301
291 // 3. Make sure r2 is a number. 302 // 3. Make sure r2 is a number.
292 { 303 {
293 Label done_convert; 304 Label done_convert;
294 __ JumpIfSmi(r2, &done_convert); 305 __ JumpIfSmi(r2, &done_convert);
295 __ CompareObjectType(r2, r4, r4, HEAP_NUMBER_TYPE); 306 __ CompareObjectType(r2, r4, r4, HEAP_NUMBER_TYPE);
296 __ b(eq, &done_convert); 307 __ b(eq, &done_convert);
297 { 308 {
298 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 309 FrameScope scope(masm, StackFrame::MANUAL);
299 __ Push(r1, r3); 310 __ SmiTag(r6);
311 __ EnterBuiltinFrame(cp, r1, r6);
312 __ Push(r3);
300 __ Move(r0, r2); 313 __ Move(r0, r2);
301 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); 314 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET);
302 __ Move(r2, r0); 315 __ Move(r2, r0);
303 __ Pop(r1, r3); 316 __ Pop(r3);
317 __ LeaveBuiltinFrame(cp, r1, r6);
318 __ SmiUntag(r6);
304 } 319 }
305 __ bind(&done_convert); 320 __ bind(&done_convert);
306 } 321 }
307 322
308 // 4. Check if new target and constructor differ. 323 // 4. Check if new target and constructor differ.
309 Label new_object; 324 Label drop_frame_and_ret, new_object;
310 __ cmp(r1, r3); 325 __ cmp(r1, r3);
311 __ b(ne, &new_object); 326 __ b(ne, &new_object);
312 327
313 // 5. Allocate a JSValue wrapper for the number. 328 // 5. Allocate a JSValue wrapper for the number.
314 __ AllocateJSValue(r0, r1, r2, r4, r5, &new_object); 329 __ AllocateJSValue(r0, r1, r2, r4, r5, &new_object);
315 __ Ret(); 330 __ b(&drop_frame_and_ret);
316 331
317 // 6. Fallback to the runtime to create new object. 332 // 6. Fallback to the runtime to create new object.
318 __ bind(&new_object); 333 __ bind(&new_object);
319 { 334 {
320 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 335 FrameScope scope(masm, StackFrame::MANUAL);
336 FastNewObjectStub stub(masm->isolate());
337 __ SmiTag(r6);
338 __ EnterBuiltinFrame(cp, r1, r6);
321 __ Push(r2); // first argument 339 __ Push(r2); // first argument
322 FastNewObjectStub stub(masm->isolate());
323 __ CallStub(&stub); 340 __ CallStub(&stub);
324 __ Pop(r2); 341 __ Pop(r2);
342 __ LeaveBuiltinFrame(cp, r1, r6);
343 __ SmiUntag(r6);
325 } 344 }
326 __ str(r2, FieldMemOperand(r0, JSValue::kValueOffset)); 345 __ str(r2, FieldMemOperand(r0, JSValue::kValueOffset));
327 __ Ret(); 346
347 __ bind(&drop_frame_and_ret);
348 {
349 __ Drop(r6);
350 __ Ret(1);
351 }
328 } 352 }
329 353
330 354
331 // static 355 // static
332 void Builtins::Generate_StringConstructor(MacroAssembler* masm) { 356 void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
333 // ----------- S t a t e ------------- 357 // ----------- S t a t e -------------
334 // -- r0 : number of arguments 358 // -- r0 : number of arguments
335 // -- r1 : constructor function 359 // -- r1 : constructor function
360 // -- cp : context
336 // -- lr : return address 361 // -- lr : return address
337 // -- sp[(argc - n - 1) * 4] : arg[n] (zero based) 362 // -- sp[(argc - n - 1) * 4] : arg[n] (zero based)
338 // -- sp[argc * 4] : receiver 363 // -- sp[argc * 4] : receiver
339 // ----------------------------------- 364 // -----------------------------------
340 365
341 // 1. Load the first argument into r0 and get rid of the rest (including the 366 // 1. Load the first argument into r0.
342 // receiver).
343 Label no_arguments; 367 Label no_arguments;
344 { 368 {
369 __ mov(r2, r0); // Store argc in r2.
345 __ sub(r0, r0, Operand(1), SetCC); 370 __ sub(r0, r0, Operand(1), SetCC);
346 __ b(lo, &no_arguments); 371 __ b(lo, &no_arguments);
347 __ ldr(r0, MemOperand(sp, r0, LSL, kPointerSizeLog2, PreIndex)); 372 __ ldr(r0, MemOperand(sp, r0, LSL, kPointerSizeLog2));
348 __ Drop(2);
349 } 373 }
350 374
351 // 2a. At least one argument, return r0 if it's a string, otherwise 375 // 2a. At least one argument, return r0 if it's a string, otherwise
352 // dispatch to appropriate conversion. 376 // dispatch to appropriate conversion.
353 Label to_string, symbol_descriptive_string; 377 Label drop_frame_and_ret, to_string, symbol_descriptive_string;
354 { 378 {
355 __ JumpIfSmi(r0, &to_string); 379 __ JumpIfSmi(r0, &to_string);
356 STATIC_ASSERT(FIRST_NONSTRING_TYPE == SYMBOL_TYPE); 380 STATIC_ASSERT(FIRST_NONSTRING_TYPE == SYMBOL_TYPE);
357 __ CompareObjectType(r0, r1, r1, FIRST_NONSTRING_TYPE); 381 __ CompareObjectType(r0, r3, r3, FIRST_NONSTRING_TYPE);
358 __ b(hi, &to_string); 382 __ b(hi, &to_string);
359 __ b(eq, &symbol_descriptive_string); 383 __ b(eq, &symbol_descriptive_string);
360 __ Ret(); 384 __ b(&drop_frame_and_ret);
361 } 385 }
362 386
363 // 2b. No arguments, return the empty string (and pop the receiver). 387 // 2b. No arguments, return the empty string (and pop the receiver).
364 __ bind(&no_arguments); 388 __ bind(&no_arguments);
365 { 389 {
366 __ LoadRoot(r0, Heap::kempty_stringRootIndex); 390 __ LoadRoot(r0, Heap::kempty_stringRootIndex);
367 __ Ret(1); 391 __ Ret(1);
368 } 392 }
369 393
370 // 3a. Convert r0 to a string. 394 // 3a. Convert r0 to a string.
371 __ bind(&to_string); 395 __ bind(&to_string);
372 { 396 {
397 FrameScope scope(masm, StackFrame::MANUAL);
373 ToStringStub stub(masm->isolate()); 398 ToStringStub stub(masm->isolate());
374 __ TailCallStub(&stub); 399 __ SmiTag(r2);
400 __ EnterBuiltinFrame(cp, r1, r2);
401 __ CallStub(&stub);
402 __ LeaveBuiltinFrame(cp, r1, r2);
403 __ SmiUntag(r2);
375 } 404 }
405 __ b(&drop_frame_and_ret);
376 406
377 // 3b. Convert symbol in r0 to a string. 407 // 3b. Convert symbol in r0 to a string.
378 __ bind(&symbol_descriptive_string); 408 __ bind(&symbol_descriptive_string);
379 { 409 {
410 __ Drop(r2);
411 __ Drop(1);
380 __ Push(r0); 412 __ Push(r0);
381 __ TailCallRuntime(Runtime::kSymbolDescriptiveString); 413 __ TailCallRuntime(Runtime::kSymbolDescriptiveString);
382 } 414 }
415
416 __ bind(&drop_frame_and_ret);
417 {
418 __ Drop(r2);
419 __ Ret(1);
420 }
383 } 421 }
384 422
385 423
386 // static 424 // static
387 void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) { 425 void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
388 // ----------- S t a t e ------------- 426 // ----------- S t a t e -------------
389 // -- r0 : number of arguments 427 // -- r0 : number of arguments
390 // -- r1 : constructor function 428 // -- r1 : constructor function
391 // -- r3 : new target 429 // -- r3 : new target
430 // -- cp : context
392 // -- lr : return address 431 // -- lr : return address
393 // -- sp[(argc - n - 1) * 4] : arg[n] (zero based) 432 // -- sp[(argc - n - 1) * 4] : arg[n] (zero based)
394 // -- sp[argc * 4] : receiver 433 // -- sp[argc * 4] : receiver
395 // ----------------------------------- 434 // -----------------------------------
396 435
397 // 1. Make sure we operate in the context of the called function. 436 // 1. Make sure we operate in the context of the called function.
398 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); 437 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
399 438
400 // 2. Load the first argument into r2 and get rid of the rest (including the 439 // 2. Load the first argument into r2.
401 // receiver).
402 { 440 {
403 Label no_arguments, done; 441 Label no_arguments, done;
442 __ mov(r6, r0); // Store argc in r6.
404 __ sub(r0, r0, Operand(1), SetCC); 443 __ sub(r0, r0, Operand(1), SetCC);
405 __ b(lo, &no_arguments); 444 __ b(lo, &no_arguments);
406 __ ldr(r2, MemOperand(sp, r0, LSL, kPointerSizeLog2, PreIndex)); 445 __ ldr(r2, MemOperand(sp, r0, LSL, kPointerSizeLog2));
407 __ Drop(2);
408 __ b(&done); 446 __ b(&done);
409 __ bind(&no_arguments); 447 __ bind(&no_arguments);
410 __ LoadRoot(r2, Heap::kempty_stringRootIndex); 448 __ LoadRoot(r2, Heap::kempty_stringRootIndex);
411 __ Drop(1);
412 __ bind(&done); 449 __ bind(&done);
413 } 450 }
414 451
415 // 3. Make sure r2 is a string. 452 // 3. Make sure r2 is a string.
416 { 453 {
417 Label convert, done_convert; 454 Label convert, done_convert;
418 __ JumpIfSmi(r2, &convert); 455 __ JumpIfSmi(r2, &convert);
419 __ CompareObjectType(r2, r4, r4, FIRST_NONSTRING_TYPE); 456 __ CompareObjectType(r2, r4, r4, FIRST_NONSTRING_TYPE);
420 __ b(lo, &done_convert); 457 __ b(lo, &done_convert);
421 __ bind(&convert); 458 __ bind(&convert);
422 { 459 {
423 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 460 FrameScope scope(masm, StackFrame::MANUAL);
424 ToStringStub stub(masm->isolate()); 461 ToStringStub stub(masm->isolate());
425 __ Push(r1, r3); 462 __ SmiTag(r6);
463 __ EnterBuiltinFrame(cp, r1, r6);
464 __ Push(r3);
426 __ Move(r0, r2); 465 __ Move(r0, r2);
427 __ CallStub(&stub); 466 __ CallStub(&stub);
428 __ Move(r2, r0); 467 __ Move(r2, r0);
429 __ Pop(r1, r3); 468 __ Pop(r3);
469 __ LeaveBuiltinFrame(cp, r1, r6);
470 __ SmiUntag(r6);
430 } 471 }
431 __ bind(&done_convert); 472 __ bind(&done_convert);
432 } 473 }
433 474
434 // 4. Check if new target and constructor differ. 475 // 4. Check if new target and constructor differ.
435 Label new_object; 476 Label drop_frame_and_ret, new_object;
436 __ cmp(r1, r3); 477 __ cmp(r1, r3);
437 __ b(ne, &new_object); 478 __ b(ne, &new_object);
438 479
439 // 5. Allocate a JSValue wrapper for the string. 480 // 5. Allocate a JSValue wrapper for the string.
440 __ AllocateJSValue(r0, r1, r2, r4, r5, &new_object); 481 __ AllocateJSValue(r0, r1, r2, r4, r5, &new_object);
441 __ Ret(); 482 __ b(&drop_frame_and_ret);
442 483
443 // 6. Fallback to the runtime to create new object. 484 // 6. Fallback to the runtime to create new object.
444 __ bind(&new_object); 485 __ bind(&new_object);
445 { 486 {
446 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 487 FrameScope scope(masm, StackFrame::MANUAL);
488 FastNewObjectStub stub(masm->isolate());
489 __ SmiTag(r6);
490 __ EnterBuiltinFrame(cp, r1, r6);
447 __ Push(r2); // first argument 491 __ Push(r2); // first argument
448 FastNewObjectStub stub(masm->isolate());
449 __ CallStub(&stub); 492 __ CallStub(&stub);
450 __ Pop(r2); 493 __ Pop(r2);
494 __ LeaveBuiltinFrame(cp, r1, r6);
495 __ SmiUntag(r6);
451 } 496 }
452 __ str(r2, FieldMemOperand(r0, JSValue::kValueOffset)); 497 __ str(r2, FieldMemOperand(r0, JSValue::kValueOffset));
453 __ Ret(); 498
499 __ bind(&drop_frame_and_ret);
500 {
501 __ Drop(r6);
502 __ Ret(1);
503 }
454 } 504 }
455 505
456 506
457 static void GenerateTailCallToSharedCode(MacroAssembler* masm) { 507 static void GenerateTailCallToSharedCode(MacroAssembler* masm) {
458 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); 508 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
459 __ ldr(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset)); 509 __ ldr(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset));
460 __ add(r2, r2, Operand(Code::kHeaderSize - kHeapObjectTag)); 510 __ add(r2, r2, Operand(Code::kHeaderSize - kHeapObjectTag));
461 __ Jump(r2); 511 __ Jump(r2);
462 } 512 }
463 513
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 __ mov(r1, Operand(Smi::FromInt(field_index))); 1849 __ mov(r1, Operand(Smi::FromInt(field_index)));
1800 __ CallCFunction( 1850 __ CallCFunction(
1801 ExternalReference::get_date_field_function(masm->isolate()), 2); 1851 ExternalReference::get_date_field_function(masm->isolate()), 2);
1802 } 1852 }
1803 __ Ret(); 1853 __ Ret();
1804 1854
1805 // 3. Raise a TypeError if the receiver is not a date. 1855 // 3. Raise a TypeError if the receiver is not a date.
1806 __ bind(&receiver_not_date); 1856 __ bind(&receiver_not_date);
1807 { 1857 {
1808 FrameScope scope(masm, StackFrame::MANUAL); 1858 FrameScope scope(masm, StackFrame::MANUAL);
1809 __ Push(r0, lr, fp); 1859 __ Push(r0);
1810 __ Move(fp, sp); 1860 __ Move(r0, Smi::FromInt(0));
1811 __ Push(cp, r1); 1861 __ EnterBuiltinFrame(cp, r1, r0);
1812 __ Push(Smi::FromInt(0));
1813 __ CallRuntime(Runtime::kThrowNotDateError); 1862 __ CallRuntime(Runtime::kThrowNotDateError);
1814 } 1863 }
1815 } 1864 }
1816 1865
1817 // static 1866 // static
1818 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1867 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1819 // ----------- S t a t e ------------- 1868 // ----------- S t a t e -------------
1820 // -- r0 : argc 1869 // -- r0 : argc
1821 // -- sp[0] : argArray 1870 // -- sp[0] : argArray
1822 // -- sp[4] : thisArg 1871 // -- sp[4] : thisArg
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
2922 } 2971 }
2923 } 2972 }
2924 2973
2925 2974
2926 #undef __ 2975 #undef __
2927 2976
2928 } // namespace internal 2977 } // namespace internal
2929 } // namespace v8 2978 } // namespace v8
2930 2979
2931 #endif // V8_TARGET_ARCH_ARM 2980 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698