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

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

Issue 93059: Remove if inside contradictory if. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 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 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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 overwrite_mode); 1370 overwrite_mode);
1371 operand->ToRegister(); 1371 operand->ToRegister();
1372 __ test(operand->reg(), Immediate(kSmiTagMask)); 1372 __ test(operand->reg(), Immediate(kSmiTagMask));
1373 deferred->enter()->Branch(not_zero, operand, not_taken); 1373 deferred->enter()->Branch(not_zero, operand, not_taken);
1374 if (shift_value != 0) { 1374 if (shift_value != 0) {
1375 Result answer = allocator()->Allocate(); 1375 Result answer = allocator()->Allocate();
1376 ASSERT(answer.is_valid()); 1376 ASSERT(answer.is_valid());
1377 __ mov(answer.reg(), operand->reg()); 1377 __ mov(answer.reg(), operand->reg());
1378 ASSERT(kSmiTag == 0); // adjust code if not the case 1378 ASSERT(kSmiTag == 0); // adjust code if not the case
1379 // We do no shifts, only the Smi conversion, if shift_value is 1. 1379 // We do no shifts, only the Smi conversion, if shift_value is 1.
1380 if (shift_value == 0) { 1380 if (shift_value > 1) {
1381 __ sar(answer.reg(), kSmiTagSize);
1382 } else if (shift_value > 1) {
1383 __ shl(answer.reg(), shift_value - 1); 1381 __ shl(answer.reg(), shift_value - 1);
1384 } 1382 }
1385 // Convert int result to Smi, checking that it is in int range. 1383 // Convert int result to Smi, checking that it is in int range.
1386 ASSERT(kSmiTagSize == times_2); // adjust code if not the case 1384 ASSERT(kSmiTagSize == times_2); // adjust code if not the case
1387 __ add(answer.reg(), Operand(answer.reg())); 1385 __ add(answer.reg(), Operand(answer.reg()));
1388 deferred->enter()->Branch(overflow, operand, not_taken); 1386 deferred->enter()->Branch(overflow, operand, not_taken);
1389 operand->Unuse(); 1387 operand->Unuse();
1390 deferred->BindExit(&answer); 1388 deferred->BindExit(&answer);
1391 frame_->Push(&answer); 1389 frame_->Push(&answer);
1392 } else { 1390 } else {
(...skipping 5728 matching lines...) Expand 10 before | Expand all | Expand 10 after
7121 7119
7122 // Slow-case: Go through the JavaScript implementation. 7120 // Slow-case: Go through the JavaScript implementation.
7123 __ bind(&slow); 7121 __ bind(&slow);
7124 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); 7122 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION);
7125 } 7123 }
7126 7124
7127 7125
7128 #undef __ 7126 #undef __
7129 7127
7130 } } // namespace v8::internal 7128 } } // 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