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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7626 | 7626 |
7627 // The type cell may have undefined in its value. | 7627 // The type cell may have undefined in its value. |
7628 __ cmp(edx, Immediate(undefined_sentinel)); | 7628 __ cmp(edx, Immediate(undefined_sentinel)); |
7629 __ j(equal, &no_info); | 7629 __ j(equal, &no_info); |
7630 | 7630 |
7631 // The type cell has either an AllocationSite or a JSFunction | 7631 // The type cell has either an AllocationSite or a JSFunction |
7632 __ cmp(FieldOperand(edx, 0), Immediate(Handle<Map>( | 7632 __ cmp(FieldOperand(edx, 0), Immediate(Handle<Map>( |
7633 masm->isolate()->heap()->allocation_site_map()))); | 7633 masm->isolate()->heap()->allocation_site_map()))); |
7634 __ j(not_equal, &no_info); | 7634 __ j(not_equal, &no_info); |
7635 | 7635 |
7636 __ mov(edx, FieldOperand(edx, AllocationSite::kPayloadOffset)); | 7636 __ mov(edx, FieldOperand(edx, AllocationSite::kTransitionInfoOffset)); |
7637 __ SmiUntag(edx); | 7637 __ SmiUntag(edx); |
7638 __ jmp(&switch_ready); | 7638 __ jmp(&switch_ready); |
7639 __ bind(&no_info); | 7639 __ bind(&no_info); |
7640 __ mov(edx, Immediate(GetInitialFastElementsKind())); | 7640 __ mov(edx, Immediate(GetInitialFastElementsKind())); |
7641 __ bind(&switch_ready); | 7641 __ bind(&switch_ready); |
7642 | 7642 |
7643 if (argument_count_ == ANY) { | 7643 if (argument_count_ == ANY) { |
7644 Label not_zero_case, not_one_case; | 7644 Label not_zero_case, not_one_case; |
7645 __ test(eax, eax); | 7645 __ test(eax, eax); |
7646 __ j(not_zero, ¬_zero_case); | 7646 __ j(not_zero, ¬_zero_case); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7751 __ bind(&fast_elements_case); | 7751 __ bind(&fast_elements_case); |
7752 GenerateCase(masm, FAST_ELEMENTS); | 7752 GenerateCase(masm, FAST_ELEMENTS); |
7753 } | 7753 } |
7754 | 7754 |
7755 | 7755 |
7756 #undef __ | 7756 #undef __ |
7757 | 7757 |
7758 } } // namespace v8::internal | 7758 } } // namespace v8::internal |
7759 | 7759 |
7760 #endif // V8_TARGET_ARCH_IA32 | 7760 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |