Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: src/ia32/builtins-ia32.cc

Issue 7085034: Reapply change to Pass undefined to JS builtins when called with (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 // Change context eagerly in case we need the global receiver. 608 // Change context eagerly in case we need the global receiver.
609 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); 609 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
610 610
611 // Do not transform the receiver for strict mode functions. 611 // Do not transform the receiver for strict mode functions.
612 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); 612 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
613 __ test_b(FieldOperand(ebx, SharedFunctionInfo::kStrictModeByteOffset), 613 __ test_b(FieldOperand(ebx, SharedFunctionInfo::kStrictModeByteOffset),
614 1 << SharedFunctionInfo::kStrictModeBitWithinByte); 614 1 << SharedFunctionInfo::kStrictModeBitWithinByte);
615 __ j(not_equal, &shift_arguments); 615 __ j(not_equal, &shift_arguments);
616 616
617 // Do not transform the receiver for natives (shared already in ebx). 617 // Do not transform the receiver for natives (shared already in ebx).
618 __ test_b(FieldOperand(ebx, SharedFunctionInfo::kES5NativeByteOffset), 618 __ test_b(FieldOperand(ebx, SharedFunctionInfo::kNativeByteOffset),
619 1 << SharedFunctionInfo::kES5NativeBitWithinByte); 619 1 << SharedFunctionInfo::kNativeBitWithinByte);
620 __ j(not_equal, &shift_arguments); 620 __ j(not_equal, &shift_arguments);
621 621
622 // Compute the receiver in non-strict mode. 622 // Compute the receiver in non-strict mode.
623 __ mov(ebx, Operand(esp, eax, times_4, 0)); // First argument. 623 __ mov(ebx, Operand(esp, eax, times_4, 0)); // First argument.
624 624
625 // Call ToObject on the receiver if it is not an object, or use the 625 // Call ToObject on the receiver if it is not an object, or use the
626 // global object if it is null or undefined. 626 // global object if it is null or undefined.
627 __ test(ebx, Immediate(kSmiTagMask)); 627 __ test(ebx, Immediate(kSmiTagMask));
628 __ j(zero, &convert_to_object); 628 __ j(zero, &convert_to_object);
629 __ cmp(ebx, factory->null_value()); 629 __ cmp(ebx, factory->null_value());
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 773
774 // Do not transform the receiver for strict mode functions. 774 // Do not transform the receiver for strict mode functions.
775 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); 775 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
776 __ test_b(FieldOperand(ecx, SharedFunctionInfo::kStrictModeByteOffset), 776 __ test_b(FieldOperand(ecx, SharedFunctionInfo::kStrictModeByteOffset),
777 1 << SharedFunctionInfo::kStrictModeBitWithinByte); 777 1 << SharedFunctionInfo::kStrictModeBitWithinByte);
778 __ j(not_equal, &push_receiver); 778 __ j(not_equal, &push_receiver);
779 779
780 Factory* factory = masm->isolate()->factory(); 780 Factory* factory = masm->isolate()->factory();
781 781
782 // Do not transform the receiver for natives (shared already in ecx). 782 // Do not transform the receiver for natives (shared already in ecx).
783 __ test_b(FieldOperand(ecx, SharedFunctionInfo::kES5NativeByteOffset), 783 __ test_b(FieldOperand(ecx, SharedFunctionInfo::kNativeByteOffset),
784 1 << SharedFunctionInfo::kES5NativeBitWithinByte); 784 1 << SharedFunctionInfo::kNativeBitWithinByte);
785 __ j(not_equal, &push_receiver); 785 __ j(not_equal, &push_receiver);
786 786
787 // Compute the receiver in non-strict mode. 787 // Compute the receiver in non-strict mode.
788 // Call ToObject on the receiver if it is not an object, or use the 788 // Call ToObject on the receiver if it is not an object, or use the
789 // global object if it is null or undefined. 789 // global object if it is null or undefined.
790 __ test(ebx, Immediate(kSmiTagMask)); 790 __ test(ebx, Immediate(kSmiTagMask));
791 __ j(zero, &call_to_object); 791 __ j(zero, &call_to_object);
792 __ cmp(ebx, factory->null_value()); 792 __ cmp(ebx, factory->null_value());
793 __ j(equal, &use_global_receiver); 793 __ j(equal, &use_global_receiver);
794 __ cmp(ebx, factory->undefined_value()); 794 __ cmp(ebx, factory->undefined_value());
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1616 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1617 generator.Generate(); 1617 generator.Generate();
1618 } 1618 }
1619 1619
1620 1620
1621 #undef __ 1621 #undef __
1622 } 1622 }
1623 } // namespace v8::internal 1623 } // namespace v8::internal
1624 1624
1625 #endif // V8_TARGET_ARCH_IA32 1625 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698