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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 555098: Support register arguments in more cases.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 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 | Annotate | Revision Log
« src/ia32/codegen-ia32.cc ('K') | « src/ia32/codegen-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 __ j(zero, &done); 1553 __ j(zero, &done);
1554 __ bind(&stub_call); 1554 __ bind(&stub_call);
1555 // Call stub. Undo operation first. 1555 // Call stub. Undo operation first.
1556 if (expr->op() == Token::INC) { 1556 if (expr->op() == Token::INC) {
1557 __ sub(Operand(eax), Immediate(Smi::FromInt(1))); 1557 __ sub(Operand(eax), Immediate(Smi::FromInt(1)));
1558 } else { 1558 } else {
1559 __ add(Operand(eax), Immediate(Smi::FromInt(1))); 1559 __ add(Operand(eax), Immediate(Smi::FromInt(1)));
1560 } 1560 }
1561 } 1561 }
1562 // Call stub for +1/-1. 1562 // Call stub for +1/-1.
1563 __ push(eax);
1564 __ push(Immediate(Smi::FromInt(1)));
1565 GenericBinaryOpStub stub(expr->binary_op(), 1563 GenericBinaryOpStub stub(expr->binary_op(),
1566 NO_OVERWRITE, 1564 NO_OVERWRITE,
1567 NO_GENERIC_BINARY_FLAGS); 1565 NO_GENERIC_BINARY_FLAGS);
1568 __ CallStub(&stub); 1566 stub.GenerateCall(masm(), eax, Smi::FromInt(1));
1569 __ bind(&done); 1567 __ bind(&done);
1570 1568
1571 // Store the value returned in eax. 1569 // Store the value returned in eax.
1572 switch (assign_type) { 1570 switch (assign_type) {
1573 case VARIABLE: 1571 case VARIABLE:
1574 if (expr->is_postfix()) { 1572 if (expr->is_postfix()) {
1575 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), 1573 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(),
1576 Expression::kEffect); 1574 Expression::kEffect);
1577 // For all contexts except kEffect: We have the result on 1575 // For all contexts except kEffect: We have the result on
1578 // top of the stack. 1576 // top of the stack.
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1821 __ add(Operand(edx), Immediate(masm_->CodeObject())); 1819 __ add(Operand(edx), Immediate(masm_->CodeObject()));
1822 __ mov(Operand(esp, 0), edx); 1820 __ mov(Operand(esp, 0), edx);
1823 // And return. 1821 // And return.
1824 __ ret(0); 1822 __ ret(0);
1825 } 1823 }
1826 1824
1827 1825
1828 #undef __ 1826 #undef __
1829 1827
1830 } } // namespace v8::internal 1828 } } // namespace v8::internal
OLDNEW
« src/ia32/codegen-ia32.cc ('K') | « src/ia32/codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698