From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/JavaScriptCore/bytecode/OperandsInlines.h | 32 ++++++++++++++++-------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'Source/JavaScriptCore/bytecode/OperandsInlines.h') 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 namespace JSC { -template -void Operands::dumpInContext(PrintStream& out, DumpContext* context) const +template +void Operands::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 +void Operands::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 -- cgit v1.2.1