OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 // Change context eagerly in case we need the global receiver. | 606 // Change context eagerly in case we need the global receiver. |
607 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); | 607 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); |
608 | 608 |
609 // Do not transform the receiver for strict mode functions. | 609 // Do not transform the receiver for strict mode functions. |
610 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 610 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
611 __ test_b(FieldOperand(ebx, SharedFunctionInfo::kStrictModeByteOffset), | 611 __ test_b(FieldOperand(ebx, SharedFunctionInfo::kStrictModeByteOffset), |
612 1 << SharedFunctionInfo::kStrictModeBitWithinByte); | 612 1 << SharedFunctionInfo::kStrictModeBitWithinByte); |
613 __ j(not_equal, &shift_arguments); | 613 __ j(not_equal, &shift_arguments); |
614 | 614 |
615 // Do not transform the receiver for natives (shared already in ebx). | 615 // Do not transform the receiver for natives (shared already in ebx). |
616 __ test_b(FieldOperand(ebx, SharedFunctionInfo::kES5NativeByteOffset), | 616 __ test_b(FieldOperand(ebx, SharedFunctionInfo::kNativeByteOffset), |
617 1 << SharedFunctionInfo::kES5NativeBitWithinByte); | 617 1 << SharedFunctionInfo::kNativeBitWithinByte); |
618 __ j(not_equal, &shift_arguments); | 618 __ j(not_equal, &shift_arguments); |
619 | 619 |
620 // Compute the receiver in non-strict mode. | 620 // Compute the receiver in non-strict mode. |
621 __ mov(ebx, Operand(esp, eax, times_4, 0)); // First argument. | 621 __ mov(ebx, Operand(esp, eax, times_4, 0)); // First argument. |
622 | 622 |
623 // Call ToObject on the receiver if it is not an object, or use the | 623 // Call ToObject on the receiver if it is not an object, or use the |
624 // global object if it is null or undefined. | 624 // global object if it is null or undefined. |
625 __ test(ebx, Immediate(kSmiTagMask)); | 625 __ test(ebx, Immediate(kSmiTagMask)); |
626 __ j(zero, &convert_to_object); | 626 __ j(zero, &convert_to_object); |
627 __ cmp(ebx, factory->null_value()); | 627 __ cmp(ebx, factory->null_value()); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 | 770 |
771 // Do not transform the receiver for strict mode functions. | 771 // Do not transform the receiver for strict mode functions. |
772 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 772 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
773 __ test_b(FieldOperand(ecx, SharedFunctionInfo::kStrictModeByteOffset), | 773 __ test_b(FieldOperand(ecx, SharedFunctionInfo::kStrictModeByteOffset), |
774 1 << SharedFunctionInfo::kStrictModeBitWithinByte); | 774 1 << SharedFunctionInfo::kStrictModeBitWithinByte); |
775 __ j(not_equal, &push_receiver); | 775 __ j(not_equal, &push_receiver); |
776 | 776 |
777 Factory* factory = masm->isolate()->factory(); | 777 Factory* factory = masm->isolate()->factory(); |
778 | 778 |
779 // Do not transform the receiver for natives (shared already in ecx). | 779 // Do not transform the receiver for natives (shared already in ecx). |
780 __ test_b(FieldOperand(ecx, SharedFunctionInfo::kES5NativeByteOffset), | 780 __ test_b(FieldOperand(ecx, SharedFunctionInfo::kNativeByteOffset), |
781 1 << SharedFunctionInfo::kES5NativeBitWithinByte); | 781 1 << SharedFunctionInfo::kNativeBitWithinByte); |
782 __ j(not_equal, &push_receiver); | 782 __ j(not_equal, &push_receiver); |
783 | 783 |
784 // Compute the receiver in non-strict mode. | 784 // Compute the receiver in non-strict mode. |
785 // Call ToObject on the receiver if it is not an object, or use the | 785 // Call ToObject on the receiver if it is not an object, or use the |
786 // global object if it is null or undefined. | 786 // global object if it is null or undefined. |
787 __ test(ebx, Immediate(kSmiTagMask)); | 787 __ test(ebx, Immediate(kSmiTagMask)); |
788 __ j(zero, &call_to_object); | 788 __ j(zero, &call_to_object); |
789 __ cmp(ebx, factory->null_value()); | 789 __ cmp(ebx, factory->null_value()); |
790 __ j(equal, &use_global_receiver); | 790 __ j(equal, &use_global_receiver); |
791 __ cmp(ebx, factory->undefined_value()); | 791 __ cmp(ebx, factory->undefined_value()); |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1612 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); |
1613 generator.Generate(); | 1613 generator.Generate(); |
1614 } | 1614 } |
1615 | 1615 |
1616 | 1616 |
1617 #undef __ | 1617 #undef __ |
1618 } | 1618 } |
1619 } // namespace v8::internal | 1619 } // namespace v8::internal |
1620 | 1620 |
1621 #endif // V8_TARGET_ARCH_IA32 | 1621 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |