| OLD | NEW |
| 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 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2297 } | 2297 } |
| 2298 } | 2298 } |
| 2299 | 2299 |
| 2300 | 2300 |
| 2301 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { | 2301 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { |
| 2302 Register left = ToRegister(instr->left()); | 2302 Register left = ToRegister(instr->left()); |
| 2303 int false_block = chunk_->LookupDestination(instr->false_block_id()); | 2303 int false_block = chunk_->LookupDestination(instr->false_block_id()); |
| 2304 int true_block = chunk_->LookupDestination(instr->true_block_id()); | 2304 int true_block = chunk_->LookupDestination(instr->true_block_id()); |
| 2305 | 2305 |
| 2306 if (instr->right()->IsConstantOperand()) { | 2306 if (instr->right()->IsConstantOperand()) { |
| 2307 __ cmp(left, ToHandle(LConstantOperand::cast(instr->right()))); | 2307 Handle<Object> right = ToHandle(LConstantOperand::cast(instr->right())); |
| 2308 __ CmpObject(left, right); |
| 2308 } else { | 2309 } else { |
| 2309 Operand right = ToOperand(instr->right()); | 2310 Operand right = ToOperand(instr->right()); |
| 2310 __ cmp(left, Operand(right)); | 2311 __ cmp(left, right); |
| 2311 } | 2312 } |
| 2312 EmitBranch(true_block, false_block, equal); | 2313 EmitBranch(true_block, false_block, equal); |
| 2313 } | 2314 } |
| 2314 | 2315 |
| 2315 | 2316 |
| 2316 void LCodeGen::DoCmpConstantEqAndBranch(LCmpConstantEqAndBranch* instr) { | 2317 void LCodeGen::DoCmpConstantEqAndBranch(LCmpConstantEqAndBranch* instr) { |
| 2317 Register left = ToRegister(instr->left()); | 2318 Register left = ToRegister(instr->left()); |
| 2318 int true_block = chunk_->LookupDestination(instr->true_block_id()); | 2319 int true_block = chunk_->LookupDestination(instr->true_block_id()); |
| 2319 int false_block = chunk_->LookupDestination(instr->false_block_id()); | 2320 int false_block = chunk_->LookupDestination(instr->false_block_id()); |
| 2320 | 2321 |
| (...skipping 4244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6565 FixedArray::kHeaderSize - kPointerSize)); | 6566 FixedArray::kHeaderSize - kPointerSize)); |
| 6566 __ bind(&done); | 6567 __ bind(&done); |
| 6567 } | 6568 } |
| 6568 | 6569 |
| 6569 | 6570 |
| 6570 #undef __ | 6571 #undef __ |
| 6571 | 6572 |
| 6572 } } // namespace v8::internal | 6573 } } // namespace v8::internal |
| 6573 | 6574 |
| 6574 #endif // V8_TARGET_ARCH_IA32 | 6575 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |