| 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 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2353 } | 2353 } |
| 2354 | 2354 |
| 2355 | 2355 |
| 2356 Condition LCodeGen::TokenToCondition(Token::Value op, bool is_unsigned) { | 2356 Condition LCodeGen::TokenToCondition(Token::Value op, bool is_unsigned) { |
| 2357 Condition cond = no_condition; | 2357 Condition cond = no_condition; |
| 2358 switch (op) { | 2358 switch (op) { |
| 2359 case Token::EQ: | 2359 case Token::EQ: |
| 2360 case Token::EQ_STRICT: | 2360 case Token::EQ_STRICT: |
| 2361 cond = equal; | 2361 cond = equal; |
| 2362 break; | 2362 break; |
| 2363 case Token::NE: |
| 2364 cond = not_equal; |
| 2365 break; |
| 2363 case Token::LT: | 2366 case Token::LT: |
| 2364 cond = is_unsigned ? below : less; | 2367 cond = is_unsigned ? below : less; |
| 2365 break; | 2368 break; |
| 2366 case Token::GT: | 2369 case Token::GT: |
| 2367 cond = is_unsigned ? above : greater; | 2370 cond = is_unsigned ? above : greater; |
| 2368 break; | 2371 break; |
| 2369 case Token::LTE: | 2372 case Token::LTE: |
| 2370 cond = is_unsigned ? below_equal : less_equal; | 2373 cond = is_unsigned ? below_equal : less_equal; |
| 2371 break; | 2374 break; |
| 2372 case Token::GTE: | 2375 case Token::GTE: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2411 cc = ReverseCondition(cc); | 2414 cc = ReverseCondition(cc); |
| 2412 } else { | 2415 } else { |
| 2413 __ cmp(ToRegister(left), ToOperand(right)); | 2416 __ cmp(ToRegister(left), ToOperand(right)); |
| 2414 } | 2417 } |
| 2415 } | 2418 } |
| 2416 EmitBranch(instr, cc); | 2419 EmitBranch(instr, cc); |
| 2417 } | 2420 } |
| 2418 } | 2421 } |
| 2419 | 2422 |
| 2420 | 2423 |
| 2421 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { | 2424 void LCodeGen::DoCmpObjectAndBranch(LCmpObjectAndBranch* instr) { |
| 2422 Register left = ToRegister(instr->left()); | 2425 Register left = ToRegister(instr->left()); |
| 2423 | 2426 |
| 2424 if (instr->right()->IsConstantOperand()) { | 2427 if (instr->right()->IsConstantOperand()) { |
| 2425 Handle<Object> right = ToHandle(LConstantOperand::cast(instr->right())); | 2428 Handle<Object> right = ToHandle(LConstantOperand::cast(instr->right())); |
| 2426 __ CmpObject(left, right); | 2429 __ CmpObject(left, right); |
| 2427 } else { | 2430 } else { |
| 2428 Operand right = ToOperand(instr->right()); | 2431 Operand right = ToOperand(instr->right()); |
| 2429 __ cmp(left, right); | 2432 __ cmp(left, right); |
| 2430 } | 2433 } |
| 2431 EmitBranch(instr, equal); | 2434 EmitBranch(instr, instr->hydrogen()->is_equal() ? equal : not_equal); |
| 2432 } | 2435 } |
| 2433 | 2436 |
| 2434 | 2437 |
| 2435 Condition LCodeGen::EmitIsObject(Register input, | 2438 Condition LCodeGen::EmitIsObject(Register input, |
| 2436 Register temp1, | 2439 Register temp1, |
| 2437 Label* is_not_object, | 2440 Label* is_not_object, |
| 2438 Label* is_object) { | 2441 Label* is_object) { |
| 2439 __ JumpIfSmi(input, is_not_object); | 2442 __ JumpIfSmi(input, is_not_object); |
| 2440 | 2443 |
| 2441 __ cmp(input, isolate()->factory()->null_value()); | 2444 __ cmp(input, isolate()->factory()->null_value()); |
| (...skipping 4042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6484 FixedArray::kHeaderSize - kPointerSize)); | 6487 FixedArray::kHeaderSize - kPointerSize)); |
| 6485 __ bind(&done); | 6488 __ bind(&done); |
| 6486 } | 6489 } |
| 6487 | 6490 |
| 6488 | 6491 |
| 6489 #undef __ | 6492 #undef __ |
| 6490 | 6493 |
| 6491 } } // namespace v8::internal | 6494 } } // namespace v8::internal |
| 6492 | 6495 |
| 6493 #endif // V8_TARGET_ARCH_IA32 | 6496 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |