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

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

Issue 115439: Apply r1978 to the 1.1 branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/1.1/
Patch Set: Created 11 years, 7 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/api.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 4838 matching lines...) Expand 10 before | Expand all | Expand 10 after
4849 } 4849 }
4850 4850
4851 // If the count operation didn't overflow and the result is a 4851 // If the count operation didn't overflow and the result is a
4852 // valid smi, we're done. Otherwise, we jump to the deferred 4852 // valid smi, we're done. Otherwise, we jump to the deferred
4853 // slow-case code. 4853 // slow-case code.
4854 // 4854 //
4855 // We combine the overflow and the smi check if we could 4855 // We combine the overflow and the smi check if we could
4856 // successfully allocate a temporary byte register. 4856 // successfully allocate a temporary byte register.
4857 if (tmp.is_valid()) { 4857 if (tmp.is_valid()) {
4858 __ setcc(overflow, tmp.reg()); 4858 __ setcc(overflow, tmp.reg());
4859 __ or_(Operand(value.reg()), tmp.reg()); 4859 __ or_(Operand(tmp.reg()), value.reg());
4860 __ test(tmp.reg(), Immediate(kSmiTagMask));
4860 tmp.Unuse(); 4861 tmp.Unuse();
4861 __ test(value.reg(), Immediate(kSmiTagMask));
4862 deferred->enter()->Branch(not_zero, &value, not_taken); 4862 deferred->enter()->Branch(not_zero, &value, not_taken);
4863 } else { // Otherwise we test separately for overflow and smi check. 4863 } else { // Otherwise we test separately for overflow and smi check.
4864 deferred->enter()->Branch(overflow, &value, not_taken); 4864 deferred->enter()->Branch(overflow, &value, not_taken);
4865 __ test(value.reg(), Immediate(kSmiTagMask)); 4865 __ test(value.reg(), Immediate(kSmiTagMask));
4866 deferred->enter()->Branch(not_zero, &value, not_taken); 4866 deferred->enter()->Branch(not_zero, &value, not_taken);
4867 } 4867 }
4868 4868
4869 // Store the new value in the target if not const. 4869 // Store the new value in the target if not const.
4870 deferred->BindExit(&value); 4870 deferred->BindExit(&value);
4871 frame_->Push(&value); 4871 frame_->Push(&value);
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after
7109 7109
7110 // Slow-case: Go through the JavaScript implementation. 7110 // Slow-case: Go through the JavaScript implementation.
7111 __ bind(&slow); 7111 __ bind(&slow);
7112 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); 7112 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION);
7113 } 7113 }
7114 7114
7115 7115
7116 #undef __ 7116 #undef __
7117 7117
7118 } } // namespace v8::internal 7118 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698