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

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

Issue 1773653002: [strong] Remove all remainders of strong mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Oversight 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
« no previous file with comments | « src/parsing/preparser.cc ('k') | src/runtime/runtime.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 __ cmp(r3, r7); // Compare before moving to next argument. 2489 __ cmp(r3, r7); // Compare before moving to next argument.
2490 __ subi(r3, r3, Operand(kPointerSize)); 2490 __ subi(r3, r3, Operand(kPointerSize));
2491 __ bne(&copy); 2491 __ bne(&copy);
2492 2492
2493 __ b(&invoke); 2493 __ b(&invoke);
2494 } 2494 }
2495 2495
2496 { // Too few parameters: Actual < expected 2496 { // Too few parameters: Actual < expected
2497 __ bind(&too_few); 2497 __ bind(&too_few);
2498 2498
2499 // If the function is strong we need to throw an error.
2500 Label no_strong_error;
2501 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
2502 __ lwz(r8, FieldMemOperand(r7, SharedFunctionInfo::kCompilerHintsOffset));
2503 __ TestBit(r8, SharedFunctionInfo::kStrongModeBit, r0);
2504 __ beq(&no_strong_error, cr0);
2505
2506 // What we really care about is the required number of arguments.
2507 __ lwz(r7, FieldMemOperand(r7, SharedFunctionInfo::kLengthOffset));
2508 #if V8_TARGET_ARCH_PPC64
2509 // See commment near kLenghtOffset in src/objects.h
2510 __ srawi(r7, r7, kSmiTagSize);
2511 #else
2512 __ SmiUntag(r7);
2513 #endif
2514 __ cmp(r3, r7);
2515 __ bge(&no_strong_error);
2516
2517 {
2518 FrameScope frame(masm, StackFrame::MANUAL);
2519 EnterArgumentsAdaptorFrame(masm);
2520 __ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
2521 }
2522
2523 __ bind(&no_strong_error);
2524 EnterArgumentsAdaptorFrame(masm); 2499 EnterArgumentsAdaptorFrame(masm);
2525 ArgumentAdaptorStackCheck(masm, &stack_overflow); 2500 ArgumentAdaptorStackCheck(masm, &stack_overflow);
2526 2501
2527 // Calculate copy start address into r0 and copy end address is fp. 2502 // Calculate copy start address into r0 and copy end address is fp.
2528 // r3: actual number of arguments as a smi 2503 // r3: actual number of arguments as a smi
2529 // r4: function 2504 // r4: function
2530 // r5: expected number of arguments 2505 // r5: expected number of arguments
2531 // r6: new target (passed through to callee) 2506 // r6: new target (passed through to callee)
2532 // ip: code entry to call 2507 // ip: code entry to call
2533 __ SmiToPtrArrayOffset(r3, r3); 2508 __ SmiToPtrArrayOffset(r3, r3);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 __ bkpt(0); 2571 __ bkpt(0);
2597 } 2572 }
2598 } 2573 }
2599 2574
2600 2575
2601 #undef __ 2576 #undef __
2602 } // namespace internal 2577 } // namespace internal
2603 } // namespace v8 2578 } // namespace v8
2604 2579
2605 #endif // V8_TARGET_ARCH_PPC 2580 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/parsing/preparser.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698