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/OperandsInlines.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/bytecode/OperandsInlines.h')
-rw-r--r-- | Source/JavaScriptCore/bytecode/OperandsInlines.h | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/bytecode/OperandsInlines.h b/Source/JavaScriptCore/bytecode/OperandsInlines.h index 74ad60bc1..65fedda07 100644 --- a/Source/JavaScriptCore/bytecode/OperandsInlines.h +++ b/Source/JavaScriptCore/bytecode/OperandsInlines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Apple Inc. All rights reserved. + * Copyright (C) 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 @@ -23,31 +23,43 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef OperandsInlines_h -#define OperandsInlines_h +#pragma once #include "Operands.h" #include <wtf/CommaPrinter.h> namespace JSC { -template<typename T, typename Traits> -void Operands<T, Traits>::dumpInContext(PrintStream& out, DumpContext* context) const +template<typename T> +void Operands<T>::dumpInContext(PrintStream& out, DumpContext* context) const { CommaPrinter comma(" "); for (size_t argumentIndex = numberOfArguments(); argumentIndex--;) { - if (Traits::isEmptyForDump(argument(argumentIndex))) + if (!argument(argumentIndex)) continue; out.print(comma, "arg", argumentIndex, ":", inContext(argument(argumentIndex), context)); } for (size_t localIndex = 0; localIndex < numberOfLocals(); ++localIndex) { - if (Traits::isEmptyForDump(local(localIndex))) + if (!local(localIndex)) continue; out.print(comma, "loc", localIndex, ":", inContext(local(localIndex), context)); } } -} // namespace JSC - -#endif // OperandsInlines_h +template<typename T> +void Operands<T>::dump(PrintStream& out) const +{ + CommaPrinter comma(" "); + for (size_t argumentIndex = numberOfArguments(); argumentIndex--;) { + if (!argument(argumentIndex)) + continue; + out.print(comma, "arg", argumentIndex, ":", argument(argumentIndex)); + } + for (size_t localIndex = 0; localIndex < numberOfLocals(); ++localIndex) { + if (!local(localIndex)) + continue; + out.print(comma, "loc", localIndex, ":", local(localIndex)); + } +} +} // namespace JSC |