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

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

Issue 7027024: MIPS:port Reapply change to Pass undefined to JS builtins when called with implicit receiver. (Closed)
Patch Set: 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') | no next file with comments »
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 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 // Calculate copy start address into a0 and copy end address is fp. 1564 // Calculate copy start address into a0 and copy end address is fp.
1565 // a0: actual number of arguments as a smi 1565 // a0: actual number of arguments as a smi
1566 // a1: function 1566 // a1: function
1567 // a2: expected number of arguments 1567 // a2: expected number of arguments
1568 // a3: code entry to call 1568 // a3: code entry to call
1569 __ sll(a0, a0, kPointerSizeLog2 - kSmiTagSize); 1569 __ sll(a0, a0, kPointerSizeLog2 - kSmiTagSize);
1570 __ Addu(a0, fp, a0); 1570 __ Addu(a0, fp, a0);
1571 // Adjust for return address and receiver. 1571 // Adjust for return address and receiver.
1572 __ Addu(a0, a0, Operand(2 * kPointerSize)); 1572 __ Addu(a0, a0, Operand(2 * kPointerSize));
1573 // Compute copy end address. Also adjust for return address. 1573 // Compute copy end address. Also adjust for return address.
1574 __ Addu(t1, fp, kPointerSize); 1574 __ Addu(t3, fp, kPointerSize);
1575 1575
1576 // Copy the arguments (including the receiver) to the new stack frame. 1576 // Copy the arguments (including the receiver) to the new stack frame.
1577 // a0: copy start address 1577 // a0: copy start address
1578 // a1: function 1578 // a1: function
1579 // a2: expected number of arguments 1579 // a2: expected number of arguments
1580 // a3: code entry to call 1580 // a3: code entry to call
1581 // t1: copy end address 1581 // t3: copy end address
1582 Label copy; 1582 Label copy;
1583 __ bind(&copy); 1583 __ bind(&copy);
1584 __ lw(t0, MemOperand(a0)); // Adjusted above for return addr and receiver. 1584 __ lw(t0, MemOperand(a0)); // Adjusted above for return addr and receiver.
1585 __ push(t0); 1585 __ push(t0);
1586 __ Subu(a0, a0, kPointerSize); 1586 __ Subu(a0, a0, kPointerSize);
1587 __ Branch(&copy, ne, a0, Operand(t1)); 1587 __ Branch(&copy, ne, a0, Operand(t3));
1588 1588
1589 // Fill the remaining expected arguments with undefined. 1589 // Fill the remaining expected arguments with undefined.
1590 // a1: function 1590 // a1: function
1591 // a2: expected number of arguments 1591 // a2: expected number of arguments
1592 // a3: code entry to call 1592 // a3: code entry to call
1593 __ LoadRoot(t0, Heap::kUndefinedValueRootIndex); 1593 __ LoadRoot(t0, Heap::kUndefinedValueRootIndex);
1594 __ sll(t2, a2, kPointerSizeLog2); 1594 __ sll(t2, a2, kPointerSizeLog2);
1595 __ Subu(a2, fp, Operand(t2)); 1595 __ Subu(a2, fp, Operand(t2));
1596 __ Addu(a2, a2, Operand(-4 * kPointerSize)); // Adjust for frame. 1596 __ Addu(a2, a2, Operand(-4 * kPointerSize)); // Adjust for frame.
1597 1597
(...skipping 19 matching lines...) Expand all
1617 __ bind(&dont_adapt_arguments); 1617 __ bind(&dont_adapt_arguments);
1618 __ Jump(a3); 1618 __ Jump(a3);
1619 } 1619 }
1620 1620
1621 1621
1622 #undef __ 1622 #undef __
1623 1623
1624 } } // namespace v8::internal 1624 } } // namespace v8::internal
1625 1625
1626 #endif // V8_TARGET_ARCH_MIPS 1626 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698