| 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 7504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7515 __ j(equal, &normal_sequence); | 7515 __ j(equal, &normal_sequence); |
| 7516 __ mov(ecx, FieldOperand(ebx, Cell::kValueOffset)); | 7516 __ mov(ecx, FieldOperand(ebx, Cell::kValueOffset)); |
| 7517 Handle<Map> allocation_site_map( | 7517 Handle<Map> allocation_site_map( |
| 7518 masm->isolate()->heap()->allocation_site_map(), | 7518 masm->isolate()->heap()->allocation_site_map(), |
| 7519 masm->isolate()); | 7519 masm->isolate()); |
| 7520 __ cmp(FieldOperand(ecx, 0), Immediate(allocation_site_map)); | 7520 __ cmp(FieldOperand(ecx, 0), Immediate(allocation_site_map)); |
| 7521 __ j(not_equal, &normal_sequence); | 7521 __ j(not_equal, &normal_sequence); |
| 7522 | 7522 |
| 7523 // Save the resulting elements kind in type info | 7523 // Save the resulting elements kind in type info |
| 7524 __ SmiTag(edx); | 7524 __ SmiTag(edx); |
| 7525 __ mov(FieldOperand(ecx, AllocationSite::kPayloadOffset), edx); | 7525 __ mov(FieldOperand(ecx, AllocationSite::kTransitionInfoOffset), edx); |
| 7526 __ SmiUntag(edx); | 7526 __ SmiUntag(edx); |
| 7527 | 7527 |
| 7528 __ bind(&normal_sequence); | 7528 __ bind(&normal_sequence); |
| 7529 int last_index = GetSequenceIndexFromFastElementsKind( | 7529 int last_index = GetSequenceIndexFromFastElementsKind( |
| 7530 TERMINAL_FAST_ELEMENTS_KIND); | 7530 TERMINAL_FAST_ELEMENTS_KIND); |
| 7531 for (int i = 0; i <= last_index; ++i) { | 7531 for (int i = 0; i <= last_index; ++i) { |
| 7532 Label next; | 7532 Label next; |
| 7533 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); | 7533 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); |
| 7534 __ cmp(edx, kind); | 7534 __ cmp(edx, kind); |
| 7535 __ j(not_equal, &next); | 7535 __ j(not_equal, &next); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7629 __ j(equal, &no_info); | 7629 __ j(equal, &no_info); |
| 7630 | 7630 |
| 7631 // We should have an allocation site object | 7631 // We should have an allocation site object |
| 7632 if (FLAG_debug_code) { | 7632 if (FLAG_debug_code) { |
| 7633 __ cmp(FieldOperand(edx, 0), | 7633 __ cmp(FieldOperand(edx, 0), |
| 7634 Immediate(Handle<Map>( | 7634 Immediate(Handle<Map>( |
| 7635 masm->isolate()->heap()->allocation_site_map()))); | 7635 masm->isolate()->heap()->allocation_site_map()))); |
| 7636 __ Assert(equal, "Expected AllocationSite object in register edx"); | 7636 __ Assert(equal, "Expected AllocationSite object in register edx"); |
| 7637 } | 7637 } |
| 7638 | 7638 |
| 7639 __ mov(edx, FieldOperand(edx, AllocationSite::kPayloadOffset)); | 7639 __ mov(edx, FieldOperand(edx, AllocationSite::kTransitionInfoOffset)); |
| 7640 __ SmiUntag(edx); | 7640 __ SmiUntag(edx); |
| 7641 __ jmp(&switch_ready); | 7641 __ jmp(&switch_ready); |
| 7642 __ bind(&no_info); | 7642 __ bind(&no_info); |
| 7643 __ mov(edx, Immediate(GetInitialFastElementsKind())); | 7643 __ mov(edx, Immediate(GetInitialFastElementsKind())); |
| 7644 __ bind(&switch_ready); | 7644 __ bind(&switch_ready); |
| 7645 | 7645 |
| 7646 if (argument_count_ == ANY) { | 7646 if (argument_count_ == ANY) { |
| 7647 Label not_zero_case, not_one_case; | 7647 Label not_zero_case, not_one_case; |
| 7648 __ test(eax, eax); | 7648 __ test(eax, eax); |
| 7649 __ j(not_zero, ¬_zero_case); | 7649 __ j(not_zero, ¬_zero_case); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7754 __ bind(&fast_elements_case); | 7754 __ bind(&fast_elements_case); |
| 7755 GenerateCase(masm, FAST_ELEMENTS); | 7755 GenerateCase(masm, FAST_ELEMENTS); |
| 7756 } | 7756 } |
| 7757 | 7757 |
| 7758 | 7758 |
| 7759 #undef __ | 7759 #undef __ |
| 7760 | 7760 |
| 7761 } } // namespace v8::internal | 7761 } } // namespace v8::internal |
| 7762 | 7762 |
| 7763 #endif // V8_TARGET_ARCH_IA32 | 7763 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |