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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 __ push(eax); | 156 __ push(eax); |
157 | 157 |
158 // Push the function to invoke on the stack. | 158 // Push the function to invoke on the stack. |
159 __ push(edi); | 159 __ push(edi); |
160 | 160 |
161 // Try to allocate the object without transitioning into C code. If any of | 161 // Try to allocate the object without transitioning into C code. If any of |
162 // the preconditions is not met, the code bails out to the runtime call. | 162 // the preconditions is not met, the code bails out to the runtime call. |
163 Label rt_call, allocated; | 163 Label rt_call, allocated; |
164 if (FLAG_inline_new) { | 164 if (FLAG_inline_new) { |
165 Label undo_allocation; | 165 Label undo_allocation; |
166 #ifdef ENABLE_DEBUGGER_SUPPORT | |
167 ExternalReference debug_step_in_fp = | 166 ExternalReference debug_step_in_fp = |
168 ExternalReference::debug_step_in_fp_address(masm->isolate()); | 167 ExternalReference::debug_step_in_fp_address(masm->isolate()); |
169 __ cmp(Operand::StaticVariable(debug_step_in_fp), Immediate(0)); | 168 __ cmp(Operand::StaticVariable(debug_step_in_fp), Immediate(0)); |
170 __ j(not_equal, &rt_call); | 169 __ j(not_equal, &rt_call); |
171 #endif | |
172 | 170 |
173 // Verified that the constructor is a JSFunction. | 171 // Verified that the constructor is a JSFunction. |
174 // Load the initial map and verify that it is in fact a map. | 172 // Load the initial map and verify that it is in fact a map. |
175 // edi: constructor | 173 // edi: constructor |
176 __ mov(eax, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); | 174 __ mov(eax, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); |
177 // Will both indicate a NULL and a Smi | 175 // Will both indicate a NULL and a Smi |
178 __ JumpIfSmi(eax, &rt_call); | 176 __ JumpIfSmi(eax, &rt_call); |
179 // edi: constructor | 177 // edi: constructor |
180 // eax: initial map (if proven valid below) | 178 // eax: initial map (if proven valid below) |
181 __ CmpObjectType(eax, MAP_TYPE, ebx); | 179 __ CmpObjectType(eax, MAP_TYPE, ebx); |
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 | 1462 |
1465 __ bind(&ok); | 1463 __ bind(&ok); |
1466 __ ret(0); | 1464 __ ret(0); |
1467 } | 1465 } |
1468 | 1466 |
1469 #undef __ | 1467 #undef __ |
1470 } | 1468 } |
1471 } // namespace v8::internal | 1469 } // namespace v8::internal |
1472 | 1470 |
1473 #endif // V8_TARGET_ARCH_IA32 | 1471 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |