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

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: Addressed review comments 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
« no previous file with comments | « src/v8natives.js ('k') | src/x64/macro-assembler-x64.h » ('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 3861 matching lines...) Expand 10 before | Expand all | Expand 10 after
3872 Label miss; 3872 Label miss;
3873 __ CompareRoot(rdx, Heap::kInstanceofCacheFunctionRootIndex); 3873 __ CompareRoot(rdx, Heap::kInstanceofCacheFunctionRootIndex);
3874 __ j(not_equal, &miss, Label::kNear); 3874 __ j(not_equal, &miss, Label::kNear);
3875 __ CompareRoot(rax, Heap::kInstanceofCacheMapRootIndex); 3875 __ CompareRoot(rax, Heap::kInstanceofCacheMapRootIndex);
3876 __ j(not_equal, &miss, Label::kNear); 3876 __ j(not_equal, &miss, Label::kNear);
3877 __ LoadRoot(rax, Heap::kInstanceofCacheAnswerRootIndex); 3877 __ LoadRoot(rax, Heap::kInstanceofCacheAnswerRootIndex);
3878 __ ret(2 * kPointerSize); 3878 __ ret(2 * kPointerSize);
3879 __ bind(&miss); 3879 __ bind(&miss);
3880 } 3880 }
3881 3881
3882 __ TryGetFunctionPrototype(rdx, rbx, &slow); 3882 __ TryGetFunctionPrototype(rdx, rbx, &slow, true);
3883 3883
3884 // Check that the function prototype is a JS object. 3884 // Check that the function prototype is a JS object.
3885 __ JumpIfSmi(rbx, &slow); 3885 __ JumpIfSmi(rbx, &slow);
3886 __ CmpObjectType(rbx, FIRST_SPEC_OBJECT_TYPE, kScratchRegister); 3886 __ CmpObjectType(rbx, FIRST_SPEC_OBJECT_TYPE, kScratchRegister);
3887 __ j(below, &slow); 3887 __ j(below, &slow);
3888 __ CmpInstanceType(kScratchRegister, LAST_SPEC_OBJECT_TYPE); 3888 __ CmpInstanceType(kScratchRegister, LAST_SPEC_OBJECT_TYPE);
3889 __ j(above, &slow); 3889 __ j(above, &slow);
3890 3890
3891 // Register mapping: 3891 // Register mapping:
3892 // rax is object map. 3892 // rax is object map.
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after
5911 5911
5912 // Fall through when we need to inform the incremental marker. 5912 // Fall through when we need to inform the incremental marker.
5913 } 5913 }
5914 5914
5915 5915
5916 #undef __ 5916 #undef __
5917 5917
5918 } } // namespace v8::internal 5918 } } // namespace v8::internal
5919 5919
5920 #endif // V8_TARGET_ARCH_X64 5920 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « 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