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

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

Issue 6471023: ARM: Add shift operations to the type recording binary operation stub (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 10 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 | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-arm.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 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after
1605 Expression* right, 1605 Expression* right,
1606 ConstantOperand constant) { 1606 ConstantOperand constant) {
1607 ASSERT(constant == kNoConstants); // Only handled case. 1607 ASSERT(constant == kNoConstants); // Only handled case.
1608 EmitBinaryOp(op, mode); 1608 EmitBinaryOp(op, mode);
1609 } 1609 }
1610 1610
1611 1611
1612 void FullCodeGenerator::EmitBinaryOp(Token::Value op, 1612 void FullCodeGenerator::EmitBinaryOp(Token::Value op,
1613 OverwriteMode mode) { 1613 OverwriteMode mode) {
1614 __ pop(r1); 1614 __ pop(r1);
1615 if (op == Token::ADD || 1615 TypeRecordingBinaryOpStub stub(op, mode);
1616 op == Token::SUB || 1616 EmitCallIC(stub.GetCode(), NULL);
1617 op == Token::MUL ||
1618 op == Token::DIV ||
1619 op == Token::MOD ||
1620 op == Token::BIT_OR ||
1621 op == Token::BIT_AND ||
1622 op == Token::BIT_XOR) {
1623 TypeRecordingBinaryOpStub stub(op, mode);
1624 __ CallStub(&stub);
1625 } else {
1626 GenericBinaryOpStub stub(op, mode, r1, r0);
1627 __ CallStub(&stub);
1628 }
1629 context()->Plug(r0); 1617 context()->Plug(r0);
1630 } 1618 }
1631 1619
1632 1620
1633 void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) { 1621 void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) {
1634 // Invalid left-hand sides are rewritten to have a 'throw 1622 // Invalid left-hand sides are rewritten to have a 'throw
1635 // ReferenceError' on the left-hand side. 1623 // ReferenceError' on the left-hand side.
1636 if (!expr->IsValidLeftHandSide()) { 1624 if (!expr->IsValidLeftHandSide()) {
1637 VisitForEffect(expr); 1625 VisitForEffect(expr);
1638 return; 1626 return;
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after
3701 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3689 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3702 __ add(pc, r1, Operand(masm_->CodeObject())); 3690 __ add(pc, r1, Operand(masm_->CodeObject()));
3703 } 3691 }
3704 3692
3705 3693
3706 #undef __ 3694 #undef __
3707 3695
3708 } } // namespace v8::internal 3696 } } // namespace v8::internal
3709 3697
3710 #endif // V8_TARGET_ARCH_ARM 3698 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698