| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 7124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7135 | 7135 |
| 7136 // Do tail-call to runtime routine. | 7136 // Do tail-call to runtime routine. |
| 7137 __ TailCallRuntime(ExternalReference(Runtime::kStackGuard), 1); | 7137 __ TailCallRuntime(ExternalReference(Runtime::kStackGuard), 1); |
| 7138 } | 7138 } |
| 7139 | 7139 |
| 7140 | 7140 |
| 7141 void FloatingPointHelper::AllocateHeapNumber(MacroAssembler* masm, | 7141 void FloatingPointHelper::AllocateHeapNumber(MacroAssembler* masm, |
| 7142 Label* need_gc, | 7142 Label* need_gc, |
| 7143 Register scratch, | 7143 Register scratch, |
| 7144 Register result) { | 7144 Register result) { |
| 7145 ExternalReference allocation_top = | 7145 // Allocate heap number in new space. |
| 7146 ExternalReference::new_space_allocation_top_address(); | 7146 __ AllocateObjectInNewSpace(HeapNumber::kSize, |
| 7147 ExternalReference allocation_limit = | 7147 result, |
| 7148 ExternalReference::new_space_allocation_limit_address(); | 7148 scratch, |
| 7149 __ movq(scratch, allocation_top); // scratch: address of allocation top. | 7149 no_reg, |
| 7150 __ movq(result, Operand(scratch, 0)); | 7150 need_gc, |
| 7151 __ addq(result, Immediate(HeapNumber::kSize)); // New top. | 7151 false); |
| 7152 __ movq(kScratchRegister, allocation_limit); | |
| 7153 __ cmpq(result, Operand(kScratchRegister, 0)); | |
| 7154 __ j(above, need_gc); | |
| 7155 | 7152 |
| 7156 __ movq(Operand(scratch, 0), result); // store new top | 7153 // Set the map and tag the result. |
| 7157 __ addq(result, Immediate(kHeapObjectTag - HeapNumber::kSize)); | 7154 __ addq(result, Immediate(kHeapObjectTag)); |
| 7158 __ movq(kScratchRegister, | 7155 __ movq(kScratchRegister, |
| 7159 Factory::heap_number_map(), | 7156 Factory::heap_number_map(), |
| 7160 RelocInfo::EMBEDDED_OBJECT); | 7157 RelocInfo::EMBEDDED_OBJECT); |
| 7161 __ movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); | 7158 __ movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
| 7162 // Tag old top and use as result. | |
| 7163 } | 7159 } |
| 7164 | 7160 |
| 7165 | 7161 |
| 7166 void FloatingPointHelper::LoadFloatOperand(MacroAssembler* masm, | 7162 void FloatingPointHelper::LoadFloatOperand(MacroAssembler* masm, |
| 7167 Register number) { | 7163 Register number) { |
| 7168 Label load_smi, done; | 7164 Label load_smi, done; |
| 7169 | 7165 |
| 7170 __ testl(number, Immediate(kSmiTagMask)); | 7166 __ testl(number, Immediate(kSmiTagMask)); |
| 7171 __ j(zero, &load_smi); | 7167 __ j(zero, &load_smi); |
| 7172 __ fld_d(FieldOperand(number, HeapNumber::kValueOffset)); | 7168 __ fld_d(FieldOperand(number, HeapNumber::kValueOffset)); |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7701 int CompareStub::MinorKey() { | 7697 int CompareStub::MinorKey() { |
| 7702 // Encode the two parameters in a unique 16 bit value. | 7698 // Encode the two parameters in a unique 16 bit value. |
| 7703 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); | 7699 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); |
| 7704 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); | 7700 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); |
| 7705 } | 7701 } |
| 7706 | 7702 |
| 7707 | 7703 |
| 7708 #undef __ | 7704 #undef __ |
| 7709 | 7705 |
| 7710 } } // namespace v8::internal | 7706 } } // namespace v8::internal |
| OLD | NEW |