| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1185 void Builtins::Generate_ArrayCode(MacroAssembler* masm) { | 1185 void Builtins::Generate_ArrayCode(MacroAssembler* masm) { |
| 1186 // ----------- S t a t e ------------- | 1186 // ----------- S t a t e ------------- |
| 1187 // -- eax : argc | 1187 // -- eax : argc |
| 1188 // -- esp[0] : return address | 1188 // -- esp[0] : return address |
| 1189 // -- esp[4] : last argument | 1189 // -- esp[4] : last argument |
| 1190 // ----------------------------------- | 1190 // ----------------------------------- |
| 1191 Label generic_array_code; | 1191 Label generic_array_code; |
| 1192 | 1192 |
| 1193 // Get the Array function. | 1193 // Get the Array function. |
| 1194 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, edi); | 1194 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, edi); |
| 1195 __ mov(edx, edi); |
| 1195 | 1196 |
| 1196 if (FLAG_debug_code) { | 1197 if (FLAG_debug_code) { |
| 1197 // Initial map for the builtin Array function should be a map. | 1198 // Initial map for the builtin Array function should be a map. |
| 1198 __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); | 1199 __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); |
| 1199 // Will both indicate a NULL and a Smi. | 1200 // Will both indicate a NULL and a Smi. |
| 1200 __ test(ebx, Immediate(kSmiTagMask)); | 1201 __ test(ebx, Immediate(kSmiTagMask)); |
| 1201 __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); | 1202 __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); |
| 1202 __ CmpObjectType(ebx, MAP_TYPE, ecx); | 1203 __ CmpObjectType(ebx, MAP_TYPE, ecx); |
| 1203 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); | 1204 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); |
| 1204 } | 1205 } |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 | 1549 |
| 1549 __ bind(&ok); | 1550 __ bind(&ok); |
| 1550 __ ret(0); | 1551 __ ret(0); |
| 1551 } | 1552 } |
| 1552 | 1553 |
| 1553 #undef __ | 1554 #undef __ |
| 1554 } | 1555 } |
| 1555 } // namespace v8::internal | 1556 } // namespace v8::internal |
| 1556 | 1557 |
| 1557 #endif // V8_TARGET_ARCH_X87 | 1558 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |