From 8945e02d86d2f362d2921ae64166cb0d09c9bbec Mon Sep 17 00:00:00 2001 From: "kmillikin@chromium.org" Date: Thu, 6 Jan 2011 14:13:40 +0000 Subject: [PATCH] Fix disassembly comment for CallFunctionStub. The comment was printing the entire minor key but labeling it with 'argc'. Review URL: http://codereview.chromium.org/6120001 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/code-stubs.h | 11 +++++------ src/disassembler.cc | 11 +++++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/code-stubs.h b/src/code-stubs.h index dc52083a19..cc52b26e06 100644 --- a/src/code-stubs.h +++ b/src/code-stubs.h @@ -1,4 +1,4 @@ -// Copyright 2006-2008 the V8 project authors. All rights reserved. +// Copyright 2011 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -723,6 +723,10 @@ class CallFunctionStub: public CodeStub { void Generate(MacroAssembler* masm); + static int ExtractArgcFromMinorKey(int minor_key) { + return ArgcBits::decode(minor_key); + } + private: int argc_; InLoopFlag in_loop_; @@ -754,11 +758,6 @@ class CallFunctionStub: public CodeStub { bool ReceiverMightBeValue() { return (flags_ & RECEIVER_MIGHT_BE_VALUE) != 0; } - - public: - static int ExtractArgcFromMinorKey(int minor_key) { - return ArgcBits::decode(minor_key); - } }; diff --git a/src/disassembler.cc b/src/disassembler.cc index bb0a07229a..194a299f02 100644 --- a/src/disassembler.cc +++ b/src/disassembler.cc @@ -1,4 +1,4 @@ -// Copyright 2010 the V8 project authors. All rights reserved. +// Copyright 2011 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -268,10 +268,13 @@ static int DecodeIt(FILE* f, Code::Kind2String(kind), CodeStub::MajorName(major_key, false)); switch (major_key) { - case CodeStub::CallFunction: - out.AddFormatted("argc = %d", minor_key); + case CodeStub::CallFunction: { + int argc = + CallFunctionStub::ExtractArgcFromMinorKey(minor_key); + out.AddFormatted("argc = %d", argc); break; - default: + } + default: out.AddFormatted("minor: %d", minor_key); } }