Title: [201221] trunk/Source/_javascript_Core
- Revision
- 201221
- Author
- [email protected]
- Date
- 2016-05-20 12:13:03 -0700 (Fri, 20 May 2016)
Log Message
JSBench regression: CodeBlock linking always copies the symbol table
https://bugs.webkit.org/show_bug.cgi?id=157951
Reviewed by Saam Barati.
We always put a SymbolTable into the constant pool, even in simple
functions in which it won't be used -- i.e., there's on eval and there
are no captured variables and so on.
This is costly because linking must copy any provided symbol tables.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitProfileType): Only add the symbol table
as a constant if we will use it at runtime.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (201220 => 201221)
--- trunk/Source/_javascript_Core/ChangeLog 2016-05-20 19:07:52 UTC (rev 201220)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-05-20 19:13:03 UTC (rev 201221)
@@ -1,3 +1,21 @@
+2016-05-20 Geoffrey Garen <[email protected]>
+
+ JSBench regression: CodeBlock linking always copies the symbol table
+ https://bugs.webkit.org/show_bug.cgi?id=157951
+
+ Reviewed by Saam Barati.
+
+ We always put a SymbolTable into the constant pool, even in simple
+ functions in which it won't be used -- i.e., there's on eval and there
+ are no captured variables and so on.
+
+ This is costly because linking must copy any provided symbol tables.
+
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::emitProfileType): Only add the symbol table
+ as a constant if we will use it at runtime.
+
2016-05-19 Benjamin Poulain <[email protected]>
[JSC] Improve int->float conversion in FTL
Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (201220 => 201221)
--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2016-05-20 19:07:52 UTC (rev 201220)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2016-05-20 19:13:03 UTC (rev 201221)
@@ -223,7 +223,7 @@
SymbolTable* functionSymbolTable = SymbolTable::create(*m_vm);
functionSymbolTable->setUsesNonStrictEval(m_usesNonStrictEval);
- int symbolTableConstantIndex = addConstantValue(functionSymbolTable)->index();
+ int symbolTableConstantIndex = 0;
FunctionParameters& parameters = *functionNode->parameters();
// http://www.ecma-international.org/ecma-262/6.0/index.html#sec-functiondeclarationinstantiation
@@ -324,6 +324,9 @@
if (shouldCaptureSomeOfTheThings)
m_lexicalEnvironmentRegister = addVar();
+ if (shouldCaptureSomeOfTheThings || vm.typeProfiler())
+ symbolTableConstantIndex = addConstantValue(functionSymbolTable)->index();
+
// We can allocate the "var" environment if we don't have default parameter expressions. If we have
// default parameter expressions, we have to hold off on allocating the "var" environment because
// the parent scope of the "var" environment is the parameter environment.
@@ -1694,6 +1697,7 @@
int symbolTableOrScopeDepth;
if (var.local() || var.offset().isScope()) {
flag = ProfileTypeBytecodeLocallyResolved;
+ ASSERT(var.symbolTableConstantIndex());
symbolTableOrScopeDepth = var.symbolTableConstantIndex();
} else {
flag = ProfileTypeBytecodeClosureVar;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes