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

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

Issue 7096006: Update apply with arguments optimization for strict mode functions and builtins. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments. 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/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 842
843 // Do not transform the receiver for strict mode functions. 843 // Do not transform the receiver for strict mode functions.
844 __ movq(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); 844 __ movq(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
845 __ testb(FieldOperand(rdx, SharedFunctionInfo::kStrictModeByteOffset), 845 __ testb(FieldOperand(rdx, SharedFunctionInfo::kStrictModeByteOffset),
846 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte)); 846 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte));
847 __ j(not_equal, &push_receiver); 847 __ j(not_equal, &push_receiver);
848 848
849 // Do not transform the receiver for natives. 849 // Do not transform the receiver for natives.
850 __ testb(FieldOperand(rdx, SharedFunctionInfo::kNativeByteOffset), 850 __ testb(FieldOperand(rdx, SharedFunctionInfo::kNativeByteOffset),
851 Immediate(1 << SharedFunctionInfo::kNativeBitWithinByte)); 851 Immediate(1 << SharedFunctionInfo::kNativeBitWithinByte));
852 __ j(not_zero, &push_receiver); 852 __ j(not_equal, &push_receiver);
853 853
854 // Compute the receiver in non-strict mode. 854 // Compute the receiver in non-strict mode.
855 __ JumpIfSmi(rbx, &call_to_object, Label::kNear); 855 __ JumpIfSmi(rbx, &call_to_object, Label::kNear);
856 __ CompareRoot(rbx, Heap::kNullValueRootIndex); 856 __ CompareRoot(rbx, Heap::kNullValueRootIndex);
857 __ j(equal, &use_global_receiver); 857 __ j(equal, &use_global_receiver);
858 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex); 858 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex);
859 __ j(equal, &use_global_receiver); 859 __ j(equal, &use_global_receiver);
860 860
861 // If given receiver is already a JavaScript object then there's no 861 // If given receiver is already a JavaScript object then there's no
862 // reason for converting it. 862 // reason for converting it.
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1515 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1516 generator.Generate(); 1516 generator.Generate();
1517 } 1517 }
1518 1518
1519 1519
1520 #undef __ 1520 #undef __
1521 1521
1522 } } // namespace v8::internal 1522 } } // namespace v8::internal
1523 1523
1524 #endif // V8_TARGET_ARCH_X64 1524 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698