| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 5136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5147 left.ToRegister(); | 5147 left.ToRegister(); |
| 5148 __ cmp(right.reg(), Operand(left.reg())); | 5148 __ cmp(right.reg(), Operand(left.reg())); |
| 5149 right.Unuse(); | 5149 right.Unuse(); |
| 5150 left.Unuse(); | 5150 left.Unuse(); |
| 5151 destination()->Split(equal); | 5151 destination()->Split(equal); |
| 5152 } | 5152 } |
| 5153 | 5153 |
| 5154 | 5154 |
| 5155 void CodeGenerator::GenerateGetFramePointer(ZoneList<Expression*>* args) { | 5155 void CodeGenerator::GenerateGetFramePointer(ZoneList<Expression*>* args) { |
| 5156 ASSERT(args->length() == 0); | 5156 ASSERT(args->length() == 0); |
| 5157 ASSERT(kSmiTagSize == 1 && kSmiTag == 0); // shifting code depends on this | 5157 ASSERT(kSmiTag == 0); // EBP value is aligned, so it should look like Smi. |
| 5158 Result ebp_as_smi = allocator_->Allocate(); | 5158 Result ebp_as_smi = allocator_->Allocate(); |
| 5159 ASSERT(ebp_as_smi.is_valid()); | 5159 ASSERT(ebp_as_smi.is_valid()); |
| 5160 __ mov(ebp_as_smi.reg(), Operand(ebp)); | 5160 __ mov(ebp_as_smi.reg(), Operand(ebp)); |
| 5161 __ shr(ebp_as_smi.reg(), kSmiTagSize); | |
| 5162 frame_->Push(&ebp_as_smi); | 5161 frame_->Push(&ebp_as_smi); |
| 5163 } | 5162 } |
| 5164 | 5163 |
| 5165 | 5164 |
| 5166 void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) { | 5165 void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) { |
| 5167 ASSERT(args->length() == 0); | 5166 ASSERT(args->length() == 0); |
| 5168 frame_->SpillAll(); | 5167 frame_->SpillAll(); |
| 5169 | 5168 |
| 5170 // Make sure the frame is aligned like the OS expects. | 5169 // Make sure the frame is aligned like the OS expects. |
| 5171 static const int kFrameAlignment = OS::ActivationFrameAlignment(); | 5170 static const int kFrameAlignment = OS::ActivationFrameAlignment(); |
| (...skipping 2745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7917 | 7916 |
| 7918 int CompareStub::MinorKey() { | 7917 int CompareStub::MinorKey() { |
| 7919 // Encode the two parameters in a unique 16 bit value. | 7918 // Encode the two parameters in a unique 16 bit value. |
| 7920 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); | 7919 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); |
| 7921 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); | 7920 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); |
| 7922 } | 7921 } |
| 7923 | 7922 |
| 7924 #undef __ | 7923 #undef __ |
| 7925 | 7924 |
| 7926 } } // namespace v8::internal | 7925 } } // namespace v8::internal |
| OLD | NEW |