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

Side by Side Diff: src/x87/macro-assembler-x87.cc

Issue 2427673004: [intrinsics] Nuke %HasCachedArrayIndex and %GetCachedArrayIndex. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « src/x87/macro-assembler-x87.h ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 void MacroAssembler::StubReturn(int argc) { 1997 void MacroAssembler::StubReturn(int argc) {
1998 DCHECK(argc >= 1 && generating_stub()); 1998 DCHECK(argc >= 1 && generating_stub());
1999 ret((argc - 1) * kPointerSize); 1999 ret((argc - 1) * kPointerSize);
2000 } 2000 }
2001 2001
2002 2002
2003 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { 2003 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
2004 return has_frame_ || !stub->SometimesSetsUpAFrame(); 2004 return has_frame_ || !stub->SometimesSetsUpAFrame();
2005 } 2005 }
2006 2006
2007
2008 void MacroAssembler::IndexFromHash(Register hash, Register index) {
2009 // The assert checks that the constants for the maximum number of digits
2010 // for an array index cached in the hash field and the number of bits
2011 // reserved for it does not conflict.
2012 DCHECK(TenToThe(String::kMaxCachedArrayIndexLength) <
2013 (1 << String::kArrayIndexValueBits));
2014 if (!index.is(hash)) {
2015 mov(index, hash);
2016 }
2017 DecodeFieldToSmi<String::ArrayIndexValueBits>(index);
2018 }
2019
2020
2021 void MacroAssembler::CallRuntime(const Runtime::Function* f, int num_arguments, 2007 void MacroAssembler::CallRuntime(const Runtime::Function* f, int num_arguments,
2022 SaveFPRegsMode save_doubles) { 2008 SaveFPRegsMode save_doubles) {
2023 // If the expected number of arguments of the runtime function is 2009 // If the expected number of arguments of the runtime function is
2024 // constant, we check that the actual number of arguments match the 2010 // constant, we check that the actual number of arguments match the
2025 // expectation. 2011 // expectation.
2026 CHECK(f->nargs < 0 || f->nargs == num_arguments); 2012 CHECK(f->nargs < 0 || f->nargs == num_arguments);
2027 2013
2028 // TODO(1236192): Most runtime routines don't need the number of 2014 // TODO(1236192): Most runtime routines don't need the number of
2029 // arguments passed in because it is constant. At some point we 2015 // arguments passed in because it is constant. At some point we
2030 // should remove this need and make the runtime routine entry code 2016 // should remove this need and make the runtime routine entry code
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
3214 mov(eax, dividend); 3200 mov(eax, dividend);
3215 shr(eax, 31); 3201 shr(eax, 31);
3216 add(edx, eax); 3202 add(edx, eax);
3217 } 3203 }
3218 3204
3219 3205
3220 } // namespace internal 3206 } // namespace internal
3221 } // namespace v8 3207 } // namespace v8
3222 3208
3223 #endif // V8_TARGET_ARCH_X87 3209 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698