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

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

Issue 6342019: ARM: Initial type recording binary operation stub... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | « src/arm/code-stubs-arm.cc ('k') | src/arm/ic-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 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 Expression* right, 1541 Expression* right,
1542 ConstantOperand constant) { 1542 ConstantOperand constant) {
1543 ASSERT(constant == kNoConstants); // Only handled case. 1543 ASSERT(constant == kNoConstants); // Only handled case.
1544 EmitBinaryOp(op, mode); 1544 EmitBinaryOp(op, mode);
1545 } 1545 }
1546 1546
1547 1547
1548 void FullCodeGenerator::EmitBinaryOp(Token::Value op, 1548 void FullCodeGenerator::EmitBinaryOp(Token::Value op,
1549 OverwriteMode mode) { 1549 OverwriteMode mode) {
1550 __ pop(r1); 1550 __ pop(r1);
1551 GenericBinaryOpStub stub(op, mode, r1, r0); 1551 if (op == Token::ADD) {
1552 __ CallStub(&stub); 1552 TypeRecordingBinaryOpStub stub(op, mode);
1553 __ CallStub(&stub);
1554 } else {
1555 GenericBinaryOpStub stub(op, mode, r1, r0);
1556 __ CallStub(&stub);
1557 }
1553 context()->Plug(r0); 1558 context()->Plug(r0);
1554 } 1559 }
1555 1560
1556 1561
1557 void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) { 1562 void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) {
1558 // Invalid left-hand sides are rewritten to have a 'throw 1563 // Invalid left-hand sides are rewritten to have a 'throw
1559 // ReferenceError' on the left-hand side. 1564 // ReferenceError' on the left-hand side.
1560 if (!expr->IsValidLeftHandSide()) { 1565 if (!expr->IsValidLeftHandSide()) {
1561 VisitForEffect(expr); 1566 VisitForEffect(expr);
1562 return; 1567 return;
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after
3611 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3616 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3612 __ add(pc, r1, Operand(masm_->CodeObject())); 3617 __ add(pc, r1, Operand(masm_->CodeObject()));
3613 } 3618 }
3614 3619
3615 3620
3616 #undef __ 3621 #undef __
3617 3622
3618 } } // namespace v8::internal 3623 } } // namespace v8::internal
3619 3624
3620 #endif // V8_TARGET_ARCH_ARM 3625 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698