Remove support for bytecode comments, since it doesn't build, and hasn't been used in a while.
https://bugs.webkit.org/show_bug.cgi?id=110035
Rubber stamped by Andreas Kling.
There are other ways of achieving the same effect, like adding print statements to the bytecode generator.
The fact that this feature doesn't build and nobody noticed implies that it's probably not a popular
feature. As well, the amount of wiring that was required for it was quite big considering its relatively
modest utility.
* GNUmakefile.list.am:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC):
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
(CodeBlock):
* bytecode/Comment.h: Removed.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitOpcode):
(JSC):
* bytecompiler/BytecodeGenerator.h:
(BytecodeGenerator):
(JSC::BytecodeGenerator::symbolTable):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 24ffb49..9b28a48 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,33 @@
+2013-02-16 Filip Pizlo <fpizlo@apple.com>
+
+ Remove support for bytecode comments, since it doesn't build, and hasn't been used in a while.
+ https://bugs.webkit.org/show_bug.cgi?id=110035
+
+ Rubber stamped by Andreas Kling.
+
+ There are other ways of achieving the same effect, like adding print statements to the bytecode generator.
+ The fact that this feature doesn't build and nobody noticed implies that it's probably not a popular
+ feature. As well, the amount of wiring that was required for it was quite big considering its relatively
+ modest utility.
+
+ * GNUmakefile.list.am:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * bytecode/CodeBlock.cpp:
+ (JSC):
+ (JSC::CodeBlock::dumpBytecode):
+ (JSC::CodeBlock::CodeBlock):
+ * bytecode/CodeBlock.h:
+ (CodeBlock):
+ * bytecode/Comment.h: Removed.
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::emitOpcode):
+ (JSC):
+ * bytecompiler/BytecodeGenerator.h:
+ (BytecodeGenerator):
+ (JSC::BytecodeGenerator::symbolTable):
+
2013-02-16 Brent Fulgham <bfulgham@webkit.org>
[Windows] Unreviewed Visual Studio 2010 build fix after r143117
diff --git a/Source/JavaScriptCore/GNUmakefile.list.am b/Source/JavaScriptCore/GNUmakefile.list.am
index cfdd81d..383c37d 100644
--- a/Source/JavaScriptCore/GNUmakefile.list.am
+++ b/Source/JavaScriptCore/GNUmakefile.list.am
@@ -105,7 +105,6 @@
Source/JavaScriptCore/bytecode/CodeBlockWithJITType.h \
Source/JavaScriptCore/bytecode/CodeOrigin.cpp \
Source/JavaScriptCore/bytecode/CodeOrigin.h \
- Source/JavaScriptCore/bytecode/Comment.h \
Source/JavaScriptCore/bytecode/DataFormat.h \
Source/JavaScriptCore/bytecode/DFGExitProfile.cpp \
Source/JavaScriptCore/bytecode/DFGExitProfile.h \
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
index c7122bc..5527eba 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
+++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
@@ -1794,10 +1794,6 @@
>
</File>
<File
- RelativePath="..\..\bytecode\Comment.h"
- >
- </File>
- <File
RelativePath="..\..\bytecode\EvalCodeCache.h"
>
</File>
diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
index 5f6fe51..aead416 100644
--- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
+++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
@@ -1766,7 +1766,6 @@
FE20CE9C15F04A9500DF3430 /* LLIntCLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntCLoop.h; path = llint/LLIntCLoop.h; sourceTree = "<group>"; };
FE4A331D15BD2E07006F54F3 /* VMInspector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VMInspector.cpp; sourceTree = "<group>"; };
FE4A331E15BD2E07006F54F3 /* VMInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VMInspector.h; sourceTree = "<group>"; };
- FEB63AA2159B9DA3008932A6 /* Comment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Comment.h; sourceTree = "<group>"; };
FED287B115EC9A5700DA8161 /* LLIntOpcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntOpcode.h; path = llint/LLIntOpcode.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -2816,7 +2815,6 @@
0FBD7E671447998F00481315 /* CodeOrigin.h */,
0F8F943F1667632D00D61971 /* CodeType.cpp */,
0F0B83A514BCF50400885B4F /* CodeType.h */,
- FEB63AA2159B9DA3008932A6 /* Comment.h */,
0F426A4A1460CD6B00131F8F /* DataFormat.h */,
0FBC0AE41496C7C100D4FBDD /* DFGExitProfile.cpp */,
0FBC0AE51496C7C100D4FBDD /* DFGExitProfile.h */,
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
index 0fcb430..974a04b 100644
--- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp
+++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
@@ -156,27 +156,6 @@
return makeString(ident.string(), "(@id", String::number(id0), ")").utf8();
}
-void CodeBlock::dumpBytecodeCommentAndNewLine(PrintStream& out, int location)
-{
-#if ENABLE(DFG_JIT)
- Vector<FrequentExitSite> exitSites = exitProfile().exitSitesFor(location);
- if (!exitSites.isEmpty()) {
- out.print(" !! frequent exits: ");
- CommaPrinter comma;
- for (unsigned i = 0; i < exitSites.size(); ++i)
- out.print(comma, exitSites[i].kind());
- }
-#endif // ENABLE(DFG_JIT)
-#if ENABLE(BYTECODE_COMMENTS)
- const char* comment = commentForBytecodeOffset(location);
- if (comment)
- out.printf("\t\t ; %s", comment);
-#else
- UNUSED_PARAM(location);
-#endif
- out.print("\n");
-}
-
CString CodeBlock::registerName(ExecState* exec, int r) const
{
if (r == missingThisObjectMarker())
@@ -1506,7 +1485,18 @@
dumpRareCaseProfile(out, "special fast case: ", specialFastCaseProfileForBytecodeOffset(location), hasPrintedProfiling);
#endif
- dumpBytecodeCommentAndNewLine(out, location);
+#if ENABLE(DFG_JIT)
+ Vector<FrequentExitSite> exitSites = exitProfile().exitSitesFor(location);
+ if (!exitSites.isEmpty()) {
+ out.print(" !! frequent exits: ");
+ CommaPrinter comma;
+ for (unsigned i = 0; i < exitSites.size(); ++i)
+ out.print(comma, exitSites[i].kind());
+ }
+#else // ENABLE(DFG_JIT)
+ UNUSED_PARAM(location);
+#endif // ENABLE(DFG_JIT)
+ out.print("\n");
}
void CodeBlock::dumpBytecode(PrintStream& out, unsigned bytecodeOffset)
@@ -1665,9 +1655,6 @@
, m_reoptimizationRetryCounter(0)
, m_resolveOperations(other.m_resolveOperations)
, m_putToBaseOperations(other.m_putToBaseOperations)
-#if ENABLE(BYTECODE_COMMENTS)
- , m_bytecodeCommentIterator(0)
-#endif
#if ENABLE(JIT)
, m_canCompileWithDFGState(DFG::CapabilityLevelNotSet)
#endif
@@ -1706,9 +1693,6 @@
, m_osrExitCounter(0)
, m_optimizationDelayCounter(0)
, m_reoptimizationRetryCounter(0)
-#if ENABLE(BYTECODE_COMMENTS)
- , m_bytecodeCommentIterator(0)
-#endif
{
m_globalData->startedCompiling(this);
@@ -2479,82 +2463,6 @@
#endif
}
-#if ENABLE(BYTECODE_COMMENTS)
-// Finds the comment string for the specified bytecode offset/PC is available.
-const char* CodeBlock::commentForBytecodeOffset(unsigned bytecodeOffset)
-{
- ASSERT(bytecodeOffset < instructions().size());
-
- Vector<Comment>& comments = m_bytecodeComments;
- size_t numberOfComments = comments.size();
- const char* result = 0;
-
- if (!numberOfComments)
- return 0; // No comments to match with.
-
- // The next match is most likely the next comment in the list.
- // Do a quick check to see if that is a match first.
- // m_bytecodeCommentIterator should already be pointing to the
- // next comment we should check.
-
- ASSERT(m_bytecodeCommentIterator < comments.size());
-
- size_t i = m_bytecodeCommentIterator;
- size_t commentPC = comments[i].pc;
- if (commentPC == bytecodeOffset) {
- // We've got a match. All done!
- m_bytecodeCommentIterator = i;
- result = comments[i].string;
- } else if (commentPC > bytecodeOffset) {
- // The current comment is already greater than the requested PC.
- // Start searching from the first comment.
- i = 0;
- } else {
- // Otherwise, the current comment's PC is less than the requested PC.
- // Hence, we can just start searching from the next comment in the
- // list.
- i++;
- }
-
- // If the result is still not found, do a linear search in the range
- // that we've determined above.
- if (!result) {
- for (; i < comments.size(); ++i) {
- commentPC = comments[i].pc;
- if (commentPC == bytecodeOffset) {
- result = comments[i].string;
- break;
- }
- if (comments[i].pc > bytecodeOffset) {
- // The current comment PC is already past the requested
- // bytecodeOffset. Hence, there are no more possible
- // matches. Just fail.
- break;
- }
- }
- }
-
- // Update the iterator to point to the next comment.
- if (++i >= numberOfComments) {
- // At most point to the last comment entry. This ensures that the
- // next time we call this function, the quick checks will at least
- // have one entry to check and can fail fast if appropriate.
- i = numberOfComments - 1;
- }
- m_bytecodeCommentIterator = i;
- return result;
-}
-
-void CodeBlock::dumpBytecodeComments()
-{
- Vector<Comment>& comments = m_bytecodeComments;
- printf("Comments for codeblock %p: size %lu\n", this, comments.size());
- for (size_t i = 0; i < comments.size(); ++i)
- printf(" pc %lu : '%s'\n", comments[i].pc, comments[i].string);
- printf("End of comments for codeblock %p\n", this);
-}
-#endif // ENABLE_BYTECODE_COMMENTS
-
HandlerInfo* CodeBlock::handlerForBytecodeOffset(unsigned bytecodeOffset)
{
RELEASE_ASSERT(bytecodeOffset < instructions().size());
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h
index abef3ef..a96d10b 100644
--- a/Source/JavaScriptCore/bytecode/CodeBlock.h
+++ b/Source/JavaScriptCore/bytecode/CodeBlock.h
@@ -38,7 +38,6 @@
#include "CodeBlockHash.h"
#include "CodeOrigin.h"
#include "CodeType.h"
-#include "Comment.h"
#include "CompactJITCodeMap.h"
#include "DFGCodeBlocks.h"
#include "DFGCommon.h"
@@ -79,30 +78,6 @@
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
-// Set ENABLE_BYTECODE_COMMENTS to 1 to enable recording bytecode generator
-// comments for the bytecodes that it generates. This will allow
-// CodeBlock::dumpBytecode() to provide some contextual info about the bytecodes.
-//
-// The way this comment system works is as follows:
-// 1. The BytecodeGenerator calls prependComment() with a constant comment
-// string in .text. The string must not be a stack or heap allocated
-// string.
-// 2. When the BytecodeGenerator's emitOpcode() is called, the last
-// prepended comment will be recorded with the PC of the opcode being
-// emitted. This comment is being recorded in the CodeBlock's
-// m_bytecodeComments.
-// 3. When CodeBlock::dumpBytecode() is called, it will pair up the comments with
-// their corresponding bytecodes based on the bytecode and comment's
-// PC. If a matching pair is found, the comment will be printed after
-// the bytecode. If not, no comment is printed.
-//
-// NOTE: Enabling this will consume additional memory at runtime to store
-// the comments. Since these comments are only useful for VM debugging
-// (as opposed to app debugging), this feature is to be disabled by default,
-// and can be enabled as needed for VM development use only.
-
-#define ENABLE_BYTECODE_COMMENTS 0
-
namespace JSC {
class DFGCodeBlocks;
@@ -201,12 +176,6 @@
return index >= m_numVars;
}
- void dumpBytecodeCommentAndNewLine(PrintStream&, int location);
-#if ENABLE(BYTECODE_COMMENTS)
- const char* commentForBytecodeOffset(PrintStream&, unsigned bytecodeOffset);
- void dumpBytecodeComments(PrintStream&);
-#endif
-
HandlerInfo* handlerForBytecodeOffset(unsigned bytecodeOffset);
int lineNumberForBytecodeOffset(unsigned bytecodeOffset);
void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset);
@@ -444,10 +413,6 @@
RefCountedArray<Instruction>& instructions() { return m_instructions; }
const RefCountedArray<Instruction>& instructions() const { return m_instructions; }
-#if ENABLE(BYTECODE_COMMENTS)
- Vector<Comment>& bytecodeComments() { return m_bytecodeComments; }
-#endif
-
size_t predictedMachineCodeSize();
bool usesOpcode(OpcodeID);
diff --git a/Source/JavaScriptCore/bytecode/Comment.h b/Source/JavaScriptCore/bytecode/Comment.h
deleted file mode 100644
index c28f3a0..0000000
--- a/Source/JavaScriptCore/bytecode/Comment.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef Comment_h
-#define Comment_h
-
-namespace JSC {
-
-struct Comment {
- size_t pc;
- const char* string;
-};
-
-} // namespace JSC
-
-#endif // Comment_h
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
index 1a44db8..d652179 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -32,7 +32,6 @@
#include "BytecodeGenerator.h"
#include "BatchedTransitionOptimizer.h"
-#include "Comment.h"
#include "Interpreter.h"
#include "JSActivation.h"
#include "JSFunction.h"
@@ -230,9 +229,6 @@
BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, ProgramNode* programNode, UnlinkedProgramCodeBlock* codeBlock, DebuggerMode debuggerMode, ProfilerMode profilerMode)
: m_shouldEmitDebugHooks(debuggerMode == DebuggerOn)
, m_shouldEmitProfileHooks(profilerMode == ProfilerOn)
-#if ENABLE(BYTECODE_COMMENTS)
- , m_currentCommentString(0)
-#endif
, m_symbolTable(0)
, m_scopeNode(programNode)
, m_codeBlock(globalData, codeBlock)
@@ -261,7 +257,6 @@
m_codeBlock->setNumParameters(1); // Allocate space for "this"
- prependComment("entering Program block");
emitOpcode(op_enter);
const VarStack& varStack = programNode->varStack();
@@ -282,9 +277,6 @@
: m_shouldEmitDebugHooks(debuggerMode == DebuggerOn)
, m_shouldEmitProfileHooks(profilerMode == ProfilerOn)
, m_symbolTable(codeBlock->symbolTable())
-#if ENABLE(BYTECODE_COMMENTS)
- , m_currentCommentString(0)
-#endif
, m_scopeNode(functionBody)
, m_codeBlock(globalData, codeBlock)
, m_activationRegister(0)
@@ -313,11 +305,9 @@
m_symbolTable->setUsesNonStrictEval(codeBlock->usesEval() && !codeBlock->isStrictMode());
m_symbolTable->setParameterCountIncludingThis(functionBody->parameters()->size() + 1);
- prependComment("entering Function block");
emitOpcode(op_enter);
if (m_codeBlock->needsFullScopeChain()) {
m_activationRegister = addVar();
- prependComment("activation for Full Scope Chain");
emitInitLazyRegister(m_activationRegister);
m_codeBlock->setActivationRegister(m_activationRegister->index());
}
@@ -334,13 +324,10 @@
codeBlock->setArgumentsRegister(argumentsRegister->index());
ASSERT_UNUSED(unmodifiedArgumentsRegister, unmodifiedArgumentsRegister->index() == JSC::unmodifiedArgumentsRegister(codeBlock->argumentsRegister()));
- prependComment("arguments for Full Scope Chain");
emitInitLazyRegister(argumentsRegister);
- prependComment("unmodified arguments for Full Scope Chain");
emitInitLazyRegister(unmodifiedArgumentsRegister);
if (m_codeBlock->isStrictMode()) {
- prependComment("create arguments for strict mode");
emitOpcode(op_create_arguments);
instructions().append(argumentsRegister->index());
}
@@ -349,7 +336,6 @@
// it from a call frame. In the long-term it should stop doing that (<rdar://problem/6911886>),
// but for now we force eager creation of the arguments object when debugging.
if (m_shouldEmitDebugHooks) {
- prependComment("create arguments for debug hooks");
emitOpcode(op_create_arguments);
instructions().append(argumentsRegister->index());
}
@@ -401,12 +387,10 @@
if (functionBody->captures(ident)) {
if (!m_hasCreatedActivation) {
m_hasCreatedActivation = true;
- prependComment("activation for captured vars");
emitOpcode(op_create_activation);
instructions().append(m_activationRegister->index());
}
m_functions.add(ident.impl());
- prependComment("captured function var");
emitNewFunction(addVar(ident, false), function);
}
}
@@ -419,7 +403,6 @@
bool canLazilyCreateFunctions = !functionBody->needsActivationForMoreThanVariables() && !m_shouldEmitDebugHooks;
if (!canLazilyCreateFunctions && !m_hasCreatedActivation) {
m_hasCreatedActivation = true;
- prependComment("cannot lazily create functions");
emitOpcode(op_create_activation);
instructions().append(m_activationRegister->index());
}
@@ -435,7 +418,6 @@
RefPtr<RegisterID> reg = addVar(ident, false);
// Don't lazily create functions that override the name 'arguments'
// as this would complicate lazy instantiation of actual arguments.
- prependComment("a function that override 'arguments'");
if (!canLazilyCreateFunctions || ident == propertyNames().arguments)
emitNewFunction(reg.get(), function);
else {
@@ -478,7 +460,6 @@
addCallee(functionBody, calleeRegister);
if (isConstructor()) {
- prependComment("'this' because we are a Constructor function");
emitCreateThis(&m_thisRegister);
} else if (!codeBlock->isStrictMode() && (functionBody->usesThis() || codeBlock->usesEval() || m_shouldEmitDebugHooks)) {
UnlinkedValueProfile profile = emitProfiledOpcode(op_convert_this);
@@ -491,9 +472,6 @@
: m_shouldEmitDebugHooks(debuggerMode == DebuggerOn)
, m_shouldEmitProfileHooks(profilerMode == ProfilerOn)
, m_symbolTable(codeBlock->symbolTable())
-#if ENABLE(BYTECODE_COMMENTS)
- , m_currentCommentString(0)
-#endif
, m_scopeNode(evalNode)
, m_codeBlock(globalData, codeBlock)
, m_thisRegister(CallFrame::thisArgumentOffset())
@@ -521,7 +499,6 @@
m_symbolTable->setUsesNonStrictEval(codeBlock->usesEval() && !codeBlock->isStrictMode());
m_codeBlock->setNumParameters(1);
- prependComment("entering Eval block");
emitOpcode(op_enter);
const DeclarationStacks::FunctionStack& functionStack = evalNode->functionStack();
@@ -704,31 +681,10 @@
ASSERT(opcodePosition - m_lastOpcodePosition == opcodeLength(m_lastOpcodeID) || m_lastOpcodeID == op_end);
m_lastOpcodePosition = opcodePosition;
#endif
- emitComment();
instructions().append(opcodeID);
m_lastOpcodeID = opcodeID;
}
-#if ENABLE(BYTECODE_COMMENTS)
-// Record a comment in the CodeBlock's comments list for the current opcode
-// that is about to be emitted.
-void BytecodeGenerator::emitComment()
-{
- if (m_currentCommentString) {
- size_t opcodePosition = instructions().size();
- Comment comment = { opcodePosition, m_currentCommentString };
- m_codeBlock->bytecodeComments().append(comment);
- m_currentCommentString = 0;
- }
-}
-
-// Register a comment to be associated with the next opcode that will be emitted.
-void BytecodeGenerator::prependComment(const char* string)
-{
- m_currentCommentString = string;
-}
-#endif
-
UnlinkedArrayProfile BytecodeGenerator::newArrayProfile()
{
#if ENABLE(VALUE_PROFILER)
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
index 74a26cc..25dd96e 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
@@ -509,18 +509,6 @@
private:
friend class Label;
-#if ENABLE(BYTECODE_COMMENTS)
- // Record a comment in the CodeBlock's comments list for the current
- // opcode that is about to be emitted.
- void emitComment();
- // Register a comment to be associated with the next opcode that will
- // be emitted.
- void prependComment(const char* string);
-#else
- ALWAYS_INLINE void emitComment() { }
- ALWAYS_INLINE void prependComment(const char*) { }
-#endif
-
void emitOpcode(OpcodeID);
UnlinkedArrayAllocationProfile newArrayAllocationProfile();
UnlinkedObjectAllocationProfile newObjectAllocationProfile();
@@ -621,9 +609,6 @@
Vector<UnlinkedInstruction>& instructions() { return m_instructions; }
SharedSymbolTable& symbolTable() { return *m_symbolTable; }
-#if ENABLE(BYTECODE_COMMENTS)
- Vector<Comment>& comments() { return m_comments; }
-#endif
bool shouldOptimizeLocals()
{
@@ -663,11 +648,6 @@
SharedSymbolTable* m_symbolTable;
-#if ENABLE(BYTECODE_COMMENTS)
- Vector<Comment> m_comments;
- const char *m_currentCommentString;
-#endif
-
ScopeNode* m_scopeNode;
Strong<UnlinkedCodeBlock> m_codeBlock;