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

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

Issue 1819813002: [es6] Faster implementation of OrdinaryHasInstance. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Revert flag-flip again. Created 4 years, 9 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
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 __ Move(rax, Smi::FromInt(0)); 2158 __ Move(rax, Smi::FromInt(0));
2159 __ StoreRoot(rax, Heap::kInstanceofCacheFunctionRootIndex); 2159 __ StoreRoot(rax, Heap::kInstanceofCacheFunctionRootIndex);
2160 __ TailCallRuntime(Runtime::kHasInPrototypeChain); 2160 __ TailCallRuntime(Runtime::kHasInPrototypeChain);
2161 2161
2162 // Slow-case: Call the %InstanceOf runtime function. 2162 // Slow-case: Call the %InstanceOf runtime function.
2163 __ bind(&slow_case); 2163 __ bind(&slow_case);
2164 __ PopReturnAddressTo(kScratchRegister); 2164 __ PopReturnAddressTo(kScratchRegister);
2165 __ Push(object); 2165 __ Push(object);
2166 __ Push(function); 2166 __ Push(function);
2167 __ PushReturnAddressFrom(kScratchRegister); 2167 __ PushReturnAddressFrom(kScratchRegister);
2168 __ TailCallRuntime(Runtime::kInstanceOf); 2168 __ TailCallRuntime(is_es6_instanceof() ? Runtime::kOrdinaryHasInstance
2169 : Runtime::kInstanceOf);
2169 } 2170 }
2170 2171
2171 2172
2172 // ------------------------------------------------------------------------- 2173 // -------------------------------------------------------------------------
2173 // StringCharCodeAtGenerator 2174 // StringCharCodeAtGenerator
2174 2175
2175 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { 2176 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
2176 // If the receiver is a smi trigger the non-string case. 2177 // If the receiver is a smi trigger the non-string case.
2177 if (check_mode_ == RECEIVER_IS_UNKNOWN) { 2178 if (check_mode_ == RECEIVER_IS_UNKNOWN) {
2178 __ JumpIfSmi(object_, receiver_not_string_); 2179 __ JumpIfSmi(object_, receiver_not_string_);
(...skipping 3427 matching lines...) Expand 10 before | Expand all | Expand 10 after
5606 NULL); 5607 NULL);
5607 } 5608 }
5608 5609
5609 5610
5610 #undef __ 5611 #undef __
5611 5612
5612 } // namespace internal 5613 } // namespace internal
5613 } // namespace v8 5614 } // namespace v8
5614 5615
5615 #endif // V8_TARGET_ARCH_X64 5616 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698