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

Side by Side Diff: src/arm/fast-codegen-arm.cc

Issue 517027: Improve count operation in top-level compiler on ARM.... (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
« no previous file with comments | « no previous file | 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 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 break; 1503 break;
1504 case KEYED_PROPERTY: 1504 case KEYED_PROPERTY:
1505 __ str(r0, MemOperand(sp, 2 * kPointerSize)); 1505 __ str(r0, MemOperand(sp, 2 * kPointerSize));
1506 break; 1506 break;
1507 } 1507 }
1508 break; 1508 break;
1509 } 1509 }
1510 } 1510 }
1511 1511
1512 // Call runtime for +1/-1. 1512 // Call runtime for +1/-1.
1513 __ push(r0);
1514 __ mov(ip, Operand(Smi::FromInt(1)));
1515 __ push(ip);
1516 if (expr->op() == Token::INC) { 1513 if (expr->op() == Token::INC) {
1517 __ CallRuntime(Runtime::kNumberAdd, 2); 1514 __ mov(ip, Operand(Smi::FromInt(1)));
1518 } else { 1515 } else {
1519 __ CallRuntime(Runtime::kNumberSub, 2); 1516 __ mov(ip, Operand(Smi::FromInt(-1)));
1520 } 1517 }
1518 __ stm(db_w, sp, ip.bit() | r0.bit());
1519 __ CallRuntime(Runtime::kNumberAdd, 2);
1521 1520
1522 // Store the value returned in r0. 1521 // Store the value returned in r0.
1523 switch (assign_type) { 1522 switch (assign_type) {
1524 case VARIABLE: 1523 case VARIABLE:
1525 __ push(r0); 1524 __ push(r0);
1526 if (expr->is_postfix()) { 1525 if (expr->is_postfix()) {
1527 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), 1526 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(),
1528 Expression::kEffect); 1527 Expression::kEffect);
1529 // For all contexts except kEffect: We have the result on 1528 // For all contexts except kEffect: We have the result on
1530 // top of the stack. 1529 // top of the stack.
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 __ pop(result_register()); 1822 __ pop(result_register());
1824 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); 1823 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize);
1825 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 1824 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
1826 __ add(pc, r1, Operand(masm_->CodeObject())); 1825 __ add(pc, r1, Operand(masm_->CodeObject()));
1827 } 1826 }
1828 1827
1829 1828
1830 #undef __ 1829 #undef __
1831 1830
1832 } } // namespace v8::internal 1831 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698