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

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

Issue 21014004: Add equality type parameter to HCompareObjectAndBranch (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 4 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 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after
2303 } 2303 }
2304 2304
2305 2305
2306 Condition LCodeGen::TokenToCondition(Token::Value op, bool is_unsigned) { 2306 Condition LCodeGen::TokenToCondition(Token::Value op, bool is_unsigned) {
2307 Condition cond = kNoCondition; 2307 Condition cond = kNoCondition;
2308 switch (op) { 2308 switch (op) {
2309 case Token::EQ: 2309 case Token::EQ:
2310 case Token::EQ_STRICT: 2310 case Token::EQ_STRICT:
2311 cond = eq; 2311 cond = eq;
2312 break; 2312 break;
2313 case Token::NE:
2314 cond = ne;
2315 break;
2313 case Token::LT: 2316 case Token::LT:
2314 cond = is_unsigned ? lo : lt; 2317 cond = is_unsigned ? lo : lt;
2315 break; 2318 break;
2316 case Token::GT: 2319 case Token::GT:
2317 cond = is_unsigned ? hi : gt; 2320 cond = is_unsigned ? hi : gt;
2318 break; 2321 break;
2319 case Token::LTE: 2322 case Token::LTE:
2320 cond = is_unsigned ? ls : le; 2323 cond = is_unsigned ? ls : le;
2321 break; 2324 break;
2322 case Token::GTE: 2325 case Token::GTE:
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2370 cond = ReverseCondition(cond); 2373 cond = ReverseCondition(cond);
2371 } else { 2374 } else {
2372 __ cmp(ToRegister(left), ToRegister(right)); 2375 __ cmp(ToRegister(left), ToRegister(right));
2373 } 2376 }
2374 } 2377 }
2375 EmitBranch(instr, cond); 2378 EmitBranch(instr, cond);
2376 } 2379 }
2377 } 2380 }
2378 2381
2379 2382
2380 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { 2383 void LCodeGen::DoCmpObjectAndBranch(LCmpObjectAndBranch* instr) {
2381 Register left = ToRegister(instr->left()); 2384 Register left = ToRegister(instr->left());
2382 Register right = ToRegister(instr->right()); 2385 Register right = ToRegister(instr->right());
2383 2386
2384 __ cmp(left, Operand(right)); 2387 __ cmp(left, Operand(right));
2385 EmitBranch(instr, eq); 2388 EmitBranch(instr, eq);
2386 } 2389 }
2387 2390
2388 2391
2389 Condition LCodeGen::EmitIsObject(Register input, 2392 Condition LCodeGen::EmitIsObject(Register input,
2390 Register temp1, 2393 Register temp1,
(...skipping 3428 matching lines...) Expand 10 before | Expand all | Expand 10 after
5819 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5822 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5820 __ ldr(result, FieldMemOperand(scratch, 5823 __ ldr(result, FieldMemOperand(scratch,
5821 FixedArray::kHeaderSize - kPointerSize)); 5824 FixedArray::kHeaderSize - kPointerSize));
5822 __ bind(&done); 5825 __ bind(&done);
5823 } 5826 }
5824 5827
5825 5828
5826 #undef __ 5829 #undef __
5827 5830
5828 } } // namespace v8::internal 5831 } } // 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