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

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

Issue 18331004: Refactoring and cleanup of control instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase to ToT Created 7 years, 5 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/lithium-arm.cc ('k') | src/code-stubs-hydrogen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2330 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 break; 2341 break;
2342 case Token::IN: 2342 case Token::IN:
2343 case Token::INSTANCEOF: 2343 case Token::INSTANCEOF:
2344 default: 2344 default:
2345 UNREACHABLE(); 2345 UNREACHABLE();
2346 } 2346 }
2347 return cond; 2347 return cond;
2348 } 2348 }
2349 2349
2350 2350
2351 void LCodeGen::DoCmpIDAndBranch(LCmpIDAndBranch* instr) { 2351 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
2352 LOperand* left = instr->left(); 2352 LOperand* left = instr->left();
2353 LOperand* right = instr->right(); 2353 LOperand* right = instr->right();
2354 Condition cond = TokenToCondition(instr->op(), false); 2354 Condition cond = TokenToCondition(instr->op(), false);
2355 2355
2356 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2356 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2357 // We can statically evaluate the comparison. 2357 // We can statically evaluate the comparison.
2358 double left_val = ToDouble(LConstantOperand::cast(left)); 2358 double left_val = ToDouble(LConstantOperand::cast(left));
2359 double right_val = ToDouble(LConstantOperand::cast(right)); 2359 double right_val = ToDouble(LConstantOperand::cast(right));
2360 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2360 int next_block = EvalComparison(instr->op(), left_val, right_val) ?
2361 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2361 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_);
(...skipping 3561 matching lines...) Expand 10 before | Expand all | Expand 10 after
5923 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5923 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5924 __ ldr(result, FieldMemOperand(scratch, 5924 __ ldr(result, FieldMemOperand(scratch,
5925 FixedArray::kHeaderSize - kPointerSize)); 5925 FixedArray::kHeaderSize - kPointerSize));
5926 __ bind(&done); 5926 __ bind(&done);
5927 } 5927 }
5928 5928
5929 5929
5930 #undef __ 5930 #undef __
5931 5931
5932 } } // namespace v8::internal 5932 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698