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

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

Issue 7000021: Support symbol comparison in crankshaft. (Closed)
Patch Set: Review fixes Created 9 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
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.h » ('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 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 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 Register left = ToRegister(instr->InputAt(0)); 1536 Register left = ToRegister(instr->InputAt(0));
1537 Register right = ToRegister(instr->InputAt(1)); 1537 Register right = ToRegister(instr->InputAt(1));
1538 int false_block = chunk_->LookupDestination(instr->false_block_id()); 1538 int false_block = chunk_->LookupDestination(instr->false_block_id());
1539 int true_block = chunk_->LookupDestination(instr->true_block_id()); 1539 int true_block = chunk_->LookupDestination(instr->true_block_id());
1540 1540
1541 __ cmp(left, Operand(right)); 1541 __ cmp(left, Operand(right));
1542 EmitBranch(true_block, false_block, equal); 1542 EmitBranch(true_block, false_block, equal);
1543 } 1543 }
1544 1544
1545 1545
1546 void LCodeGen::DoCmpSymbolEq(LCmpSymbolEq* instr) {
1547 Register left = ToRegister(instr->InputAt(0));
1548 Register right = ToRegister(instr->InputAt(1));
1549 Register result = ToRegister(instr->result());
1550
1551 Label done;
1552 __ cmp(left, Operand(right));
1553 __ mov(result, factory()->false_value());
1554 __ j(not_equal, &done, Label::kNear);
1555 __ mov(result, factory()->true_value());
1556 __ bind(&done);
1557 }
1558
1559
1560 void LCodeGen::DoCmpSymbolEqAndBranch(LCmpSymbolEqAndBranch* instr) {
1561 Register left = ToRegister(instr->InputAt(0));
1562 Register right = ToRegister(instr->InputAt(1));
1563 int false_block = chunk_->LookupDestination(instr->false_block_id());
1564 int true_block = chunk_->LookupDestination(instr->true_block_id());
1565
1566 __ cmp(left, Operand(right));
1567 EmitBranch(true_block, false_block, equal);
1568 }
1569
1570
1546 void LCodeGen::DoIsNull(LIsNull* instr) { 1571 void LCodeGen::DoIsNull(LIsNull* instr) {
1547 Register reg = ToRegister(instr->InputAt(0)); 1572 Register reg = ToRegister(instr->InputAt(0));
1548 Register result = ToRegister(instr->result()); 1573 Register result = ToRegister(instr->result());
1549 1574
1550 // TODO(fsc): If the expression is known to be a smi, then it's 1575 // TODO(fsc): If the expression is known to be a smi, then it's
1551 // definitely not null. Materialize false. 1576 // definitely not null. Materialize false.
1552 1577
1553 __ cmp(reg, factory()->null_value()); 1578 __ cmp(reg, factory()->null_value());
1554 if (instr->is_strict()) { 1579 if (instr->is_strict()) {
1555 __ mov(result, factory()->true_value()); 1580 __ mov(result, factory()->true_value());
(...skipping 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after
4336 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 4361 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
4337 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4362 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4338 } 4363 }
4339 4364
4340 4365
4341 #undef __ 4366 #undef __
4342 4367
4343 } } // namespace v8::internal 4368 } } // namespace v8::internal
4344 4369
4345 #endif // V8_TARGET_ARCH_IA32 4370 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698