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

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

Issue 1773653002: [strong] Remove all remainders of strong mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
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 2531 matching lines...) Expand 10 before | Expand all | Expand 10 after
2542 __ ld(a5, MemOperand(a0)); 2542 __ ld(a5, MemOperand(a0));
2543 __ push(a5); 2543 __ push(a5);
2544 __ Branch(USE_DELAY_SLOT, &copy, ne, a0, Operand(a4)); 2544 __ Branch(USE_DELAY_SLOT, &copy, ne, a0, Operand(a4));
2545 __ daddiu(a0, a0, -kPointerSize); // In delay slot. 2545 __ daddiu(a0, a0, -kPointerSize); // In delay slot.
2546 2546
2547 __ jmp(&invoke); 2547 __ jmp(&invoke);
2548 } 2548 }
2549 2549
2550 { // Too few parameters: Actual < expected. 2550 { // Too few parameters: Actual < expected.
2551 __ bind(&too_few); 2551 __ bind(&too_few);
2552
2553 // If the function is strong we need to throw an error.
2554 Label no_strong_error;
2555 __ ld(a4, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset));
2556 __ lbu(a5, FieldMemOperand(a4, SharedFunctionInfo::kStrongModeByteOffset));
2557 __ And(a5, a5, Operand(1 << SharedFunctionInfo::kStrongModeBitWithinByte));
2558 __ Branch(&no_strong_error, eq, a5, Operand(zero_reg));
2559
2560 // What we really care about is the required number of arguments.
2561 DCHECK_EQ(kPointerSize, kInt64Size);
2562 __ lw(a5, FieldMemOperand(a4, SharedFunctionInfo::kLengthOffset));
2563 __ srl(a5, a5, 1);
2564 __ Branch(&no_strong_error, ge, a0, Operand(a5));
2565
2566 {
2567 FrameScope frame(masm, StackFrame::MANUAL);
2568 EnterArgumentsAdaptorFrame(masm);
2569 __ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
2570 }
2571
2572 __ bind(&no_strong_error);
2573 EnterArgumentsAdaptorFrame(masm); 2552 EnterArgumentsAdaptorFrame(masm);
2574 ArgumentAdaptorStackCheck(masm, &stack_overflow); 2553 ArgumentAdaptorStackCheck(masm, &stack_overflow);
2575 2554
2576 // Calculate copy start address into a0 and copy end address into a7. 2555 // Calculate copy start address into a0 and copy end address into a7.
2577 // a0: actual number of arguments as a smi 2556 // a0: actual number of arguments as a smi
2578 // a1: function 2557 // a1: function
2579 // a2: expected number of arguments 2558 // a2: expected number of arguments
2580 // a3: new target (passed through to callee) 2559 // a3: new target (passed through to callee)
2581 __ SmiScale(a0, a0, kPointerSizeLog2); 2560 __ SmiScale(a0, a0, kPointerSizeLog2);
2582 __ Daddu(a0, fp, a0); 2561 __ Daddu(a0, fp, a0);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
2649 } 2628 }
2650 } 2629 }
2651 2630
2652 2631
2653 #undef __ 2632 #undef __
2654 2633
2655 } // namespace internal 2634 } // namespace internal
2656 } // namespace v8 2635 } // namespace v8
2657 2636
2658 #endif // V8_TARGET_ARCH_MIPS64 2637 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698