diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp')
-rw-r--r-- | Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp b/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp index 1ac5bb5a0..f479e5f85 100644 --- a/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp +++ b/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. + * Copyright (C) 2012, 2013, 2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,7 +28,10 @@ #if ENABLE(DFG_JIT) +#include "ArithProfile.h" +#include "CCallHelpers.h" #include "CodeBlock.h" +#include "JSCInlines.h" namespace JSC { @@ -43,28 +46,32 @@ MethodOfGettingAValueProfile MethodOfGettingAValueProfile::fromLazyOperand( return result; } -EncodedJSValue* MethodOfGettingAValueProfile::getSpecFailBucket(unsigned index) const +void MethodOfGettingAValueProfile::emitReportValue(CCallHelpers& jit, JSValueRegs regs) const { switch (m_kind) { case None: - return 0; + return; case Ready: - return u.profile->specFailBucket(index); + jit.storeValue(regs, u.profile->specFailBucket(0)); + return; case LazyOperand: { LazyOperandValueProfileKey key(u.lazyOperand.bytecodeOffset, VirtualRegister(u.lazyOperand.operand)); - ConcurrentJITLocker locker(u.lazyOperand.codeBlock->m_lock); + ConcurrentJSLocker locker(u.lazyOperand.codeBlock->m_lock); LazyOperandValueProfile* profile = u.lazyOperand.codeBlock->lazyOperandValueProfiles().add(locker, key); - return profile->specFailBucket(index); + jit.storeValue(regs, profile->specFailBucket(0)); + return; } - default: - RELEASE_ASSERT_NOT_REACHED(); - return 0; - } + case ArithProfileReady: { + u.arithProfile->emitObserveResult(jit, regs, DoNotHaveTagRegisters); + return; + } } + + RELEASE_ASSERT_NOT_REACHED(); } } // namespace JSC |