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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 8199004: Reimplement Function.prototype.bind. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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
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 3865 matching lines...) Expand 10 before | Expand all | Expand 10 after
3876 Label miss; 3876 Label miss;
3877 __ CompareRoot(rdx, Heap::kInstanceofCacheFunctionRootIndex); 3877 __ CompareRoot(rdx, Heap::kInstanceofCacheFunctionRootIndex);
3878 __ j(not_equal, &miss, Label::kNear); 3878 __ j(not_equal, &miss, Label::kNear);
3879 __ CompareRoot(rax, Heap::kInstanceofCacheMapRootIndex); 3879 __ CompareRoot(rax, Heap::kInstanceofCacheMapRootIndex);
3880 __ j(not_equal, &miss, Label::kNear); 3880 __ j(not_equal, &miss, Label::kNear);
3881 __ LoadRoot(rax, Heap::kInstanceofCacheAnswerRootIndex); 3881 __ LoadRoot(rax, Heap::kInstanceofCacheAnswerRootIndex);
3882 __ ret(2 * kPointerSize); 3882 __ ret(2 * kPointerSize);
3883 __ bind(&miss); 3883 __ bind(&miss);
3884 } 3884 }
3885 3885
3886 __ TryGetFunctionPrototype(rdx, rbx, &slow); 3886 __ TryGetFunctionPrototype(rdx, rbx, &slow, true);
3887 3887
3888 // Check that the function prototype is a JS object. 3888 // Check that the function prototype is a JS object.
3889 __ JumpIfSmi(rbx, &slow); 3889 __ JumpIfSmi(rbx, &slow);
3890 __ CmpObjectType(rbx, FIRST_SPEC_OBJECT_TYPE, kScratchRegister); 3890 __ CmpObjectType(rbx, FIRST_SPEC_OBJECT_TYPE, kScratchRegister);
3891 __ j(below, &slow); 3891 __ j(below, &slow);
3892 __ CmpInstanceType(kScratchRegister, LAST_SPEC_OBJECT_TYPE); 3892 __ CmpInstanceType(kScratchRegister, LAST_SPEC_OBJECT_TYPE);
3893 __ j(above, &slow); 3893 __ j(above, &slow);
3894 3894
3895 // Register mapping: 3895 // Register mapping:
3896 // rax is object map. 3896 // rax is object map.
(...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after
5914 5914
5915 // Fall through when we need to inform the incremental marker. 5915 // Fall through when we need to inform the incremental marker.
5916 } 5916 }
5917 5917
5918 5918
5919 #undef __ 5919 #undef __
5920 5920
5921 } } // namespace v8::internal 5921 } } // namespace v8::internal
5922 5922
5923 #endif // V8_TARGET_ARCH_X64 5923 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/runtime.cc ('K') | « src/v8natives.js ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698