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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 6339013: ARM: Fix the type recording binary operation stub subtract... (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 | « 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 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 2677 matching lines...) Expand 10 before | Expand all | Expand 10 after
2688 2688
2689 Label call_runtime; 2689 Label call_runtime;
2690 2690
2691 GenerateSmiCode(masm, &call_runtime, ALLOW_HEAPNUMBER_RESULTS); 2691 GenerateSmiCode(masm, &call_runtime, ALLOW_HEAPNUMBER_RESULTS);
2692 2692
2693 // If all else fails, use the runtime system to get the correct 2693 // If all else fails, use the runtime system to get the correct
2694 // result. 2694 // result.
2695 __ bind(&call_runtime); 2695 __ bind(&call_runtime);
2696 2696
2697 // Try to add strings before calling runtime. 2697 // Try to add strings before calling runtime.
2698 GenerateAddStrings(masm); 2698 if (op_ == Token::ADD) {
2699 GenerateAddStrings(masm);
2700 }
2699 2701
2700 GenericBinaryOpStub stub(op_, mode_, r1, r0); 2702 GenericBinaryOpStub stub(op_, mode_, r1, r0);
2701 __ TailCallStub(&stub); 2703 __ TailCallStub(&stub);
2702 } 2704 }
2703 2705
2704 2706
2705 void TypeRecordingBinaryOpStub::GenerateAddStrings(MacroAssembler* masm) { 2707 void TypeRecordingBinaryOpStub::GenerateAddStrings(MacroAssembler* masm) {
2708 ASSERT(op_ == Token::ADD);
2709
2706 Register left = r1; 2710 Register left = r1;
2707 Register right = r0; 2711 Register right = r0;
2708 Label call_runtime; 2712 Label call_runtime;
2709 2713
2710 // Check if first argument is a string. 2714 // Check if first argument is a string.
2711 __ JumpIfSmi(left, &call_runtime); 2715 __ JumpIfSmi(left, &call_runtime);
2712 __ CompareObjectType(left, r2, r2, FIRST_NONSTRING_TYPE); 2716 __ CompareObjectType(left, r2, r2, FIRST_NONSTRING_TYPE);
2713 __ b(ge, &call_runtime); 2717 __ b(ge, &call_runtime);
2714 2718
2715 // First argument is a a string, test second. 2719 // First argument is a a string, test second.
(...skipping 2940 matching lines...) Expand 10 before | Expand all | Expand 10 after
5656 __ pop(r1); 5660 __ pop(r1);
5657 __ Jump(r2); 5661 __ Jump(r2);
5658 } 5662 }
5659 5663
5660 5664
5661 #undef __ 5665 #undef __
5662 5666
5663 } } // namespace v8::internal 5667 } } // namespace v8::internal
5664 5668
5665 #endif // V8_TARGET_ARCH_ARM 5669 #endif // V8_TARGET_ARCH_ARM
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