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 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 break; | 2195 break; |
2196 case Token::IN: | 2196 case Token::IN: |
2197 case Token::INSTANCEOF: | 2197 case Token::INSTANCEOF: |
2198 default: | 2198 default: |
2199 UNREACHABLE(); | 2199 UNREACHABLE(); |
2200 } | 2200 } |
2201 return cond; | 2201 return cond; |
2202 } | 2202 } |
2203 | 2203 |
2204 | 2204 |
2205 void LCodeGen::DoCmpIDAndBranch(LCmpIDAndBranch* instr) { | 2205 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { |
2206 LOperand* left = instr->left(); | 2206 LOperand* left = instr->left(); |
2207 LOperand* right = instr->right(); | 2207 LOperand* right = instr->right(); |
2208 Condition cond = TokenToCondition(instr->op(), false); | 2208 Condition cond = TokenToCondition(instr->op(), false); |
2209 | 2209 |
2210 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2210 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
2211 // We can statically evaluate the comparison. | 2211 // We can statically evaluate the comparison. |
2212 double left_val = ToDouble(LConstantOperand::cast(left)); | 2212 double left_val = ToDouble(LConstantOperand::cast(left)); |
2213 double right_val = ToDouble(LConstantOperand::cast(right)); | 2213 double right_val = ToDouble(LConstantOperand::cast(right)); |
2214 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2214 int next_block = EvalComparison(instr->op(), left_val, right_val) ? |
2215 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2215 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); |
(...skipping 3705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5921 __ Subu(scratch, result, scratch); | 5921 __ Subu(scratch, result, scratch); |
5922 __ lw(result, FieldMemOperand(scratch, | 5922 __ lw(result, FieldMemOperand(scratch, |
5923 FixedArray::kHeaderSize - kPointerSize)); | 5923 FixedArray::kHeaderSize - kPointerSize)); |
5924 __ bind(&done); | 5924 __ bind(&done); |
5925 } | 5925 } |
5926 | 5926 |
5927 | 5927 |
5928 #undef __ | 5928 #undef __ |
5929 | 5929 |
5930 } } // namespace v8::internal | 5930 } } // namespace v8::internal |
OLD | NEW |