| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 | 510 |
| 511 void CodeGenerator::ConvertInt32ResultToSmi(Result* value) { | 511 void CodeGenerator::ConvertInt32ResultToSmi(Result* value) { |
| 512 ASSERT(value->is_untagged_int32()); | 512 ASSERT(value->is_untagged_int32()); |
| 513 if (value->is_register()) { | 513 if (value->is_register()) { |
| 514 __ add(value->reg(), Operand(value->reg())); | 514 __ add(value->reg(), Operand(value->reg())); |
| 515 } else { | 515 } else { |
| 516 ASSERT(value->is_constant()); | 516 ASSERT(value->is_constant()); |
| 517 ASSERT(value->handle()->IsSmi()); | 517 ASSERT(value->handle()->IsSmi()); |
| 518 } | 518 } |
| 519 value->set_untagged_int32(false); | 519 value->set_untagged_int32(false); |
| 520 value->set_number_info(NumberInfo::Smi()); | 520 value->set_type_info(TypeInfo::Smi()); |
| 521 } | 521 } |
| 522 | 522 |
| 523 | 523 |
| 524 void CodeGenerator::ConvertInt32ResultToNumber(Result* value) { | 524 void CodeGenerator::ConvertInt32ResultToNumber(Result* value) { |
| 525 ASSERT(value->is_untagged_int32()); | 525 ASSERT(value->is_untagged_int32()); |
| 526 if (value->is_register()) { | 526 if (value->is_register()) { |
| 527 Register val = value->reg(); | 527 Register val = value->reg(); |
| 528 JumpTarget done; | 528 JumpTarget done; |
| 529 __ add(val, Operand(val)); | 529 __ add(val, Operand(val)); |
| 530 done.Branch(no_overflow, value); | 530 done.Branch(no_overflow, value); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 RegisterFile empty_regs; | 562 RegisterFile empty_regs; |
| 563 SetFrame(clone, &empty_regs); | 563 SetFrame(clone, &empty_regs); |
| 564 __ bind(&allocation_failed); | 564 __ bind(&allocation_failed); |
| 565 unsafe_bailout_->Jump(); | 565 unsafe_bailout_->Jump(); |
| 566 | 566 |
| 567 done.Bind(value); | 567 done.Bind(value); |
| 568 } else { | 568 } else { |
| 569 ASSERT(value->is_constant()); | 569 ASSERT(value->is_constant()); |
| 570 } | 570 } |
| 571 value->set_untagged_int32(false); | 571 value->set_untagged_int32(false); |
| 572 value->set_number_info(NumberInfo::Integer32()); | 572 value->set_type_info(TypeInfo::Integer32()); |
| 573 } | 573 } |
| 574 | 574 |
| 575 | 575 |
| 576 void CodeGenerator::Load(Expression* expr) { | 576 void CodeGenerator::Load(Expression* expr) { |
| 577 #ifdef DEBUG | 577 #ifdef DEBUG |
| 578 int original_height = frame_->height(); | 578 int original_height = frame_->height(); |
| 579 #endif | 579 #endif |
| 580 ASSERT(!in_spilled_code()); | 580 ASSERT(!in_spilled_code()); |
| 581 | 581 |
| 582 // If the expression should be a side-effect-free 32-bit int computation, | 582 // If the expression should be a side-effect-free 32-bit int computation, |
| (...skipping 11974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12557 | 12557 |
| 12558 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 12558 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
| 12559 // tagged as a small integer. | 12559 // tagged as a small integer. |
| 12560 __ bind(&runtime); | 12560 __ bind(&runtime); |
| 12561 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); | 12561 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); |
| 12562 } | 12562 } |
| 12563 | 12563 |
| 12564 #undef __ | 12564 #undef __ |
| 12565 | 12565 |
| 12566 } } // namespace v8::internal | 12566 } } // namespace v8::internal |
| OLD | NEW |