| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 __ j(zero, &done, not_taken); | 146 __ j(zero, &done, not_taken); |
| 147 // Check if the object has been loaded. | 147 // Check if the object has been loaded. |
| 148 __ mov(scratch, FieldOperand(value, JSFunction::kMapOffset)); | 148 __ mov(scratch, FieldOperand(value, JSFunction::kMapOffset)); |
| 149 __ mov(scratch, FieldOperand(scratch, Map::kBitField2Offset)); | 149 __ mov(scratch, FieldOperand(scratch, Map::kBitField2Offset)); |
| 150 __ test(scratch, Immediate(1 << Map::kNeedsLoading)); | 150 __ test(scratch, Immediate(1 << Map::kNeedsLoading)); |
| 151 __ j(not_zero, miss, not_taken); | 151 __ j(not_zero, miss, not_taken); |
| 152 __ bind(&done); | 152 __ bind(&done); |
| 153 } | 153 } |
| 154 | 154 |
| 155 | 155 |
| 156 // The offset from the inlined patch site to the start of the |
| 157 // inlined load instruction. It is 7 bytes (test eax, imm) plus |
| 158 // 6 bytes (jne slow_label). |
| 156 const int LoadIC::kOffsetToLoadInstruction = 13; | 159 const int LoadIC::kOffsetToLoadInstruction = 13; |
| 157 | 160 |
| 158 | 161 |
| 159 void LoadIC::GenerateArrayLength(MacroAssembler* masm) { | 162 void LoadIC::GenerateArrayLength(MacroAssembler* masm) { |
| 160 // ----------- S t a t e ------------- | 163 // ----------- S t a t e ------------- |
| 161 // -- ecx : name | 164 // -- ecx : name |
| 162 // -- esp[0] : return address | 165 // -- esp[0] : return address |
| 163 // -- esp[4] : receiver | 166 // -- esp[4] : receiver |
| 164 // ----------------------------------- | 167 // ----------------------------------- |
| 165 | 168 |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 | 975 |
| 973 // Do tail-call to runtime routine. | 976 // Do tail-call to runtime routine. |
| 974 __ TailCallRuntime( | 977 __ TailCallRuntime( |
| 975 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3); | 978 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3); |
| 976 } | 979 } |
| 977 | 980 |
| 978 #undef __ | 981 #undef __ |
| 979 | 982 |
| 980 | 983 |
| 981 } } // namespace v8::internal | 984 } } // namespace v8::internal |
| OLD | NEW |