| 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 4433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4444 // Make sure the function is the Array() function | 4444 // Make sure the function is the Array() function |
| 4445 __ cmp(edi, Operand(ecx, | 4445 __ cmp(edi, Operand(ecx, |
| 4446 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX))); | 4446 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX))); |
| 4447 __ j(not_equal, ¬_array_function); | 4447 __ j(not_equal, ¬_array_function); |
| 4448 | 4448 |
| 4449 // The target function is the Array constructor, | 4449 // The target function is the Array constructor, |
| 4450 // Create an AllocationSite if we don't already have it, store it in the cell | 4450 // Create an AllocationSite if we don't already have it, store it in the cell |
| 4451 { | 4451 { |
| 4452 FrameScope scope(masm, StackFrame::INTERNAL); | 4452 FrameScope scope(masm, StackFrame::INTERNAL); |
| 4453 | 4453 |
| 4454 __ SmiTag(eax); |
| 4454 __ push(eax); | 4455 __ push(eax); |
| 4455 __ push(edi); | 4456 __ push(edi); |
| 4456 __ push(ebx); | 4457 __ push(ebx); |
| 4457 | 4458 |
| 4458 CreateAllocationSiteStub create_stub; | 4459 CreateAllocationSiteStub create_stub; |
| 4459 __ CallStub(&create_stub); | 4460 __ CallStub(&create_stub); |
| 4460 | 4461 |
| 4461 __ pop(ebx); | 4462 __ pop(ebx); |
| 4462 __ pop(edi); | 4463 __ pop(edi); |
| 4463 __ pop(eax); | 4464 __ pop(eax); |
| 4465 __ SmiUntag(eax); |
| 4464 } | 4466 } |
| 4465 __ jmp(&done); | 4467 __ jmp(&done); |
| 4466 | 4468 |
| 4467 __ bind(¬_array_function); | 4469 __ bind(¬_array_function); |
| 4468 __ mov(FieldOperand(ebx, Cell::kValueOffset), edi); | 4470 __ mov(FieldOperand(ebx, Cell::kValueOffset), edi); |
| 4469 // No need for a write barrier here - cells are rescanned. | 4471 // No need for a write barrier here - cells are rescanned. |
| 4470 | 4472 |
| 4471 __ bind(&done); | 4473 __ bind(&done); |
| 4472 } | 4474 } |
| 4473 | 4475 |
| (...skipping 3240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7714 __ bind(&fast_elements_case); | 7716 __ bind(&fast_elements_case); |
| 7715 GenerateCase(masm, FAST_ELEMENTS); | 7717 GenerateCase(masm, FAST_ELEMENTS); |
| 7716 } | 7718 } |
| 7717 | 7719 |
| 7718 | 7720 |
| 7719 #undef __ | 7721 #undef __ |
| 7720 | 7722 |
| 7721 } } // namespace v8::internal | 7723 } } // namespace v8::internal |
| 7722 | 7724 |
| 7723 #endif // V8_TARGET_ARCH_IA32 | 7725 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |