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 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2329 break; | 2329 break; |
2330 case Token::IN: | 2330 case Token::IN: |
2331 case Token::INSTANCEOF: | 2331 case Token::INSTANCEOF: |
2332 default: | 2332 default: |
2333 UNREACHABLE(); | 2333 UNREACHABLE(); |
2334 } | 2334 } |
2335 return cond; | 2335 return cond; |
2336 } | 2336 } |
2337 | 2337 |
2338 | 2338 |
2339 void LCodeGen::DoCmpIDAndBranch(LCmpIDAndBranch* instr) { | 2339 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { |
2340 LOperand* left = instr->left(); | 2340 LOperand* left = instr->left(); |
2341 LOperand* right = instr->right(); | 2341 LOperand* right = instr->right(); |
2342 Condition cond = TokenToCondition(instr->op(), false); | 2342 Condition cond = TokenToCondition(instr->op(), false); |
2343 | 2343 |
2344 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2344 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
2345 // We can statically evaluate the comparison. | 2345 // We can statically evaluate the comparison. |
2346 double left_val = ToDouble(LConstantOperand::cast(left)); | 2346 double left_val = ToDouble(LConstantOperand::cast(left)); |
2347 double right_val = ToDouble(LConstantOperand::cast(right)); | 2347 double right_val = ToDouble(LConstantOperand::cast(right)); |
2348 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2348 int next_block = EvalComparison(instr->op(), left_val, right_val) ? |
2349 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2349 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); |
(...skipping 3561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5911 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5911 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5912 __ ldr(result, FieldMemOperand(scratch, | 5912 __ ldr(result, FieldMemOperand(scratch, |
5913 FixedArray::kHeaderSize - kPointerSize)); | 5913 FixedArray::kHeaderSize - kPointerSize)); |
5914 __ bind(&done); | 5914 __ bind(&done); |
5915 } | 5915 } |
5916 | 5916 |
5917 | 5917 |
5918 #undef __ | 5918 #undef __ |
5919 | 5919 |
5920 } } // namespace v8::internal | 5920 } } // namespace v8::internal |
OLD | NEW |