<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[181664] trunk/Source/JavaScriptCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/181664">181664</a></dd>
<dt>Author</dt> <dd>ggaren@apple.com</dd>
<dt>Date</dt> <dd>2015-03-17 14:15:03 -0700 (Tue, 17 Mar 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Built-in functions should know that they use strict mode
https://bugs.webkit.org/show_bug.cgi?id=142788
Reviewed by Mark Lam.
Even though all of our builtin functions use strict mode, the parser
thinks that they don't. This is because Executable::toStrictness treats
builtin-ness and strict-ness as mutually exclusive.
The fix is to disambiguate builtin-ness from strict-ness.
This bug is currently unobservable because of some other parser bugs. But
it causes lots of test failures once those other bugs are fixed.
* API/JSScriptRef.cpp:
(parseScript):
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createBuiltinExecutable): Adopt the new API
for a separate value to indicate builtin-ness vs strict-ness.
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::codeBlockFor): Ditto.
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedFunctionExecutable::toStrictness): Deleted. This function
was misleading since it pretended that no builtin function was ever
strict, which is the opposite of true.
* parser/Lexer.cpp:
(JSC::Lexer<T>::Lexer):
* parser/Lexer.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
* parser/Parser.h:
(JSC::parse): Adopt the new API.
* parser/ParserModes.h: Added JSParserBuiltinMode, and tried to give
existing modes clearer names.
* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getProgramCodeBlock):
(JSC::CodeCache::getEvalCodeBlock):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode): Adopt the new API.
* runtime/CodeCache.h:
(JSC::SourceCodeKey::SourceCodeKey): Be sure to treat strict-ness and
bulitin-ness as separate pieces of the code cache key. We would not want
a user function to match a built-in function in the cache, even if they
agreed about strictness, since builtin functions have different lexing
rules.
* runtime/Completion.cpp:
(JSC::checkSyntax):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::ProgramExecutable::checkSyntax):
* runtime/Executable.h:
(JSC::FunctionExecutable::create):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::createProgramCodeBlock):
(JSC::JSGlobalObject::createEvalCodeBlock): Adopt the new API.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreAPIJSScriptRefcpp">trunk/Source/JavaScriptCore/API/JSScriptRef.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsBuiltinExecutablescpp">trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserLexercpp">trunk/Source/JavaScriptCore/parser/Lexer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserLexerh">trunk/Source/JavaScriptCore/parser/Lexer.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParsercpp">trunk/Source/JavaScriptCore/parser/Parser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParserh">trunk/Source/JavaScriptCore/parser/Parser.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParserModesh">trunk/Source/JavaScriptCore/parser/ParserModes.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCodeCachecpp">trunk/Source/JavaScriptCore/runtime/CodeCache.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCodeCacheh">trunk/Source/JavaScriptCore/runtime/CodeCache.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCompletioncpp">trunk/Source/JavaScriptCore/runtime/Completion.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeExecutablecpp">trunk/Source/JavaScriptCore/runtime/Executable.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeExecutableh">trunk/Source/JavaScriptCore/runtime/Executable.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreAPIJSScriptRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/JSScriptRef.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/JSScriptRef.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/API/JSScriptRef.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -68,7 +68,10 @@
</span><span class="cx">
</span><span class="cx"> static bool parseScript(VM* vm, const SourceCode& source, ParserError& error)
</span><span class="cx"> {
</span><del>- return !!JSC::parse<JSC::ProgramNode>(vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error);
</del><ins>+ return !!JSC::parse<JSC::ProgramNode>(
+ vm, source, 0, Identifier(), JSParserBuiltinMode::NotBuiltin,
+ JSParserStrictMode::NotStrict, JSParserCodeType::Program,
+ error);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> extern "C" {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -1,3 +1,69 @@
</span><ins>+2015-03-17 Geoffrey Garen <ggaren@apple.com>
+
+ Built-in functions should know that they use strict mode
+ https://bugs.webkit.org/show_bug.cgi?id=142788
+
+ Reviewed by Mark Lam.
+
+ Even though all of our builtin functions use strict mode, the parser
+ thinks that they don't. This is because Executable::toStrictness treats
+ builtin-ness and strict-ness as mutually exclusive.
+
+ The fix is to disambiguate builtin-ness from strict-ness.
+
+ This bug is currently unobservable because of some other parser bugs. But
+ it causes lots of test failures once those other bugs are fixed.
+
+ * API/JSScriptRef.cpp:
+ (parseScript):
+ * builtins/BuiltinExecutables.cpp:
+ (JSC::BuiltinExecutables::createBuiltinExecutable): Adopt the new API
+ for a separate value to indicate builtin-ness vs strict-ness.
+
+ * bytecode/UnlinkedCodeBlock.cpp:
+ (JSC::generateFunctionCodeBlock):
+ (JSC::UnlinkedFunctionExecutable::codeBlockFor): Ditto.
+
+ * bytecode/UnlinkedCodeBlock.h:
+ (JSC::UnlinkedFunctionExecutable::toStrictness): Deleted. This function
+ was misleading since it pretended that no builtin function was ever
+ strict, which is the opposite of true.
+
+ * parser/Lexer.cpp:
+ (JSC::Lexer<T>::Lexer):
+ * parser/Lexer.h:
+ * parser/Parser.cpp:
+ (JSC::Parser<LexerType>::Parser):
+ * parser/Parser.h:
+ (JSC::parse): Adopt the new API.
+
+ * parser/ParserModes.h: Added JSParserBuiltinMode, and tried to give
+ existing modes clearer names.
+
+ * runtime/CodeCache.cpp:
+ (JSC::CodeCache::getGlobalCodeBlock):
+ (JSC::CodeCache::getProgramCodeBlock):
+ (JSC::CodeCache::getEvalCodeBlock):
+ (JSC::CodeCache::getFunctionExecutableFromGlobalCode): Adopt the new API.
+
+ * runtime/CodeCache.h:
+ (JSC::SourceCodeKey::SourceCodeKey): Be sure to treat strict-ness and
+ bulitin-ness as separate pieces of the code cache key. We would not want
+ a user function to match a built-in function in the cache, even if they
+ agreed about strictness, since builtin functions have different lexing
+ rules.
+
+ * runtime/Completion.cpp:
+ (JSC::checkSyntax):
+ * runtime/Executable.cpp:
+ (JSC::FunctionExecutable::FunctionExecutable):
+ (JSC::ProgramExecutable::checkSyntax):
+ * runtime/Executable.h:
+ (JSC::FunctionExecutable::create):
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::createProgramCodeBlock):
+ (JSC::JSGlobalObject::createEvalCodeBlock): Adopt the new API.
+
</ins><span class="cx"> 2015-03-16 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> DFG IR shouldn't have a separate node for every kind of put hint that could be described using PromotedLocationDescriptor
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsBuiltinExecutablescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -65,10 +65,13 @@
</span><span class="cx"> JSTextPosition positionBeforeLastNewline;
</span><span class="cx"> ParserError error;
</span><span class="cx"> bool isParsingDefaultConstructor = constructorKind != ConstructorKind::None;
</span><del>- JSParserStrictness strictness = isParsingDefaultConstructor ? JSParseNormal : JSParseBuiltin;
</del><ins>+ JSParserBuiltinMode builtinMode = isParsingDefaultConstructor ? JSParserBuiltinMode::NotBuiltin : JSParserBuiltinMode::Builtin;
</ins><span class="cx"> UnlinkedFunctionKind kind = isParsingDefaultConstructor ? UnlinkedNormalFunction : UnlinkedBuiltinFunction;
</span><span class="cx"> RefPtr<SourceProvider> sourceOverride = isParsingDefaultConstructor ? source.provider() : nullptr;
</span><del>- std::unique_ptr<ProgramNode> program = parse<ProgramNode>(&m_vm, source, 0, Identifier(), strictness, JSParseProgramCode,
</del><ins>+ std::unique_ptr<ProgramNode> program = parse<ProgramNode>(
+ &m_vm, source, 0, Identifier(), builtinMode,
+ JSParserStrictMode::NotStrict,
+ JSParserCodeType::Program,
</ins><span class="cx"> error, &positionBeforeLastNewline, false, constructorKind);
</span><span class="cx">
</span><span class="cx"> if (!program) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -49,9 +49,16 @@
</span><span class="cx"> const ClassInfo UnlinkedEvalCodeBlock::s_info = { "UnlinkedEvalCodeBlock", &Base::s_info, 0, CREATE_METHOD_TABLE(UnlinkedEvalCodeBlock) };
</span><span class="cx"> const ClassInfo UnlinkedFunctionCodeBlock::s_info = { "UnlinkedFunctionCodeBlock", &Base::s_info, 0, CREATE_METHOD_TABLE(UnlinkedFunctionCodeBlock) };
</span><span class="cx">
</span><del>-static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(VM& vm, UnlinkedFunctionExecutable* executable, const SourceCode& source, CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, UnlinkedFunctionKind functionKind, bool bodyIncludesBraces, ParserError& error)
</del><ins>+static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(
+ VM& vm, UnlinkedFunctionExecutable* executable, const SourceCode& source,
+ CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode,
+ UnlinkedFunctionKind functionKind, bool bodyIncludesBraces, ParserError& error)
</ins><span class="cx"> {
</span><del>- std::unique_ptr<FunctionNode> function = parse<FunctionNode>(&vm, source, executable->parameters(), executable->name(), executable->toStrictness(), JSParseFunctionCode, error, 0, bodyIncludesBraces);
</del><ins>+ JSParserBuiltinMode builtinMode = executable->isBuiltinFunction() ? JSParserBuiltinMode::Builtin : JSParserBuiltinMode::NotBuiltin;
+ JSParserStrictMode strictMode = executable->isInStrictContext() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
+ std::unique_ptr<FunctionNode> function = parse<FunctionNode>(
+ &vm, source, executable->parameters(), executable->name(), builtinMode,
+ strictMode, JSParserCodeType::Function, error, 0, bodyIncludesBraces);
</ins><span class="cx">
</span><span class="cx"> if (!function) {
</span><span class="cx"> ASSERT(error.isValid());
</span><span class="lines">@@ -177,7 +184,10 @@
</span><span class="cx"> return executable;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor(VM& vm, const SourceCode& source, CodeSpecializationKind specializationKind, DebuggerMode debuggerMode, ProfilerMode profilerMode, bool bodyIncludesBraces, ParserError& error)
</del><ins>+UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor(
+ VM& vm, const SourceCode& source, CodeSpecializationKind specializationKind,
+ DebuggerMode debuggerMode, ProfilerMode profilerMode, bool bodyIncludesBraces,
+ ParserError& error)
</ins><span class="cx"> {
</span><span class="cx"> switch (specializationKind) {
</span><span class="cx"> case CodeForCall:
</span><span class="lines">@@ -190,7 +200,10 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(vm, this, source, specializationKind, debuggerMode, profilerMode, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, bodyIncludesBraces, error);
</del><ins>+ UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(
+ vm, this, source, specializationKind, debuggerMode, profilerMode,
+ isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction,
+ bodyIncludesBraces, error);
</ins><span class="cx">
</span><span class="cx"> if (error.isValid())
</span><span class="cx"> return nullptr;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -121,14 +121,6 @@
</span><span class="cx"> size_t parameterCount() const;
</span><span class="cx"> bool isInStrictContext() const { return m_isInStrictContext; }
</span><span class="cx"> FunctionMode functionMode() const { return m_functionMode; }
</span><del>- JSParserStrictness toStrictness() const
- {
- if (m_isBuiltinFunction)
- return JSParseBuiltin;
- if (m_isInStrictContext)
- return JSParseStrict;
- return JSParseNormal;
- }
</del><span class="cx"> ConstructorKind constructorKind() const { return static_cast<ConstructorKind>(m_constructorKind); }
</span><span class="cx">
</span><span class="cx"> unsigned unlinkedFunctionNameStart() const { return m_unlinkedFunctionNameStart; }
</span><span class="lines">@@ -141,7 +133,9 @@
</span><span class="cx">
</span><span class="cx"> String paramString() const;
</span><span class="cx">
</span><del>- UnlinkedFunctionCodeBlock* codeBlockFor(VM&, const SourceCode&, CodeSpecializationKind, DebuggerMode, ProfilerMode, bool bodyIncludesBraces, ParserError&);
</del><ins>+ UnlinkedFunctionCodeBlock* codeBlockFor(
+ VM&, const SourceCode&, CodeSpecializationKind, DebuggerMode, ProfilerMode,
+ bool bodyIncludesBraces, ParserError&);
</ins><span class="cx">
</span><span class="cx"> static UnlinkedFunctionExecutable* fromGlobalCode(const Identifier&, ExecState&, const SourceCode&, JSObject*& exception);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserLexercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Lexer.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Lexer.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/parser/Lexer.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -488,10 +488,10 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template <typename T>
</span><del>-Lexer<T>::Lexer(VM* vm, JSParserStrictness strictness)
</del><ins>+Lexer<T>::Lexer(VM* vm, JSParserBuiltinMode builtinMode)
</ins><span class="cx"> : m_isReparsing(false)
</span><span class="cx"> , m_vm(vm)
</span><del>- , m_parsingBuiltinFunction(strictness == JSParseBuiltin)
</del><ins>+ , m_parsingBuiltinFunction(builtinMode == JSParserBuiltinMode::Builtin)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserLexerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Lexer.h (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Lexer.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/parser/Lexer.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx">
</span><span class="cx"> public:
</span><del>- Lexer(VM*, JSParserStrictness);
</del><ins>+ Lexer(VM*, JSParserBuiltinMode);
</ins><span class="cx"> ~Lexer();
</span><span class="cx">
</span><span class="cx"> // Character manipulation functions.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -190,7 +190,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <typename LexerType>
</span><del>-Parser<LexerType>::Parser(VM* vm, const SourceCode& source, FunctionParameters* parameters, const Identifier& name, JSParserStrictness strictness, JSParserMode parserMode, ConstructorKind defaultConstructorKind)
</del><ins>+Parser<LexerType>::Parser(
+ VM* vm, const SourceCode& source, FunctionParameters* parameters,
+ const Identifier& name, JSParserBuiltinMode builtinMode,
+ JSParserStrictMode strictMode, JSParserCodeType codeType,
+ ConstructorKind defaultConstructorKind)
</ins><span class="cx"> : m_vm(vm)
</span><span class="cx"> , m_source(&source)
</span><span class="cx"> , m_hasStackOverflow(false)
</span><span class="lines">@@ -203,10 +207,10 @@
</span><span class="cx"> , m_lastIdentifier(0)
</span><span class="cx"> , m_lastFunctionName(nullptr)
</span><span class="cx"> , m_sourceElements(0)
</span><del>- , m_parsingBuiltin(strictness == JSParseBuiltin)
</del><ins>+ , m_parsingBuiltin(builtinMode == JSParserBuiltinMode::Builtin)
</ins><span class="cx"> , m_defaultConstructorKind(defaultConstructorKind)
</span><span class="cx"> {
</span><del>- m_lexer = std::make_unique<LexerType>(vm, strictness);
</del><ins>+ m_lexer = std::make_unique<LexerType>(vm, builtinMode);
</ins><span class="cx"> m_lexer->setCode(source, &m_parserArena);
</span><span class="cx"> m_token.m_location.line = source.firstLine();
</span><span class="cx"> m_token.m_location.startOffset = source.startOffset();
</span><span class="lines">@@ -214,9 +218,9 @@
</span><span class="cx"> m_token.m_location.lineStartOffset = source.startOffset();
</span><span class="cx"> m_functionCache = vm->addSourceProviderCache(source.provider());
</span><span class="cx"> ScopeRef scope = pushScope();
</span><del>- if (parserMode == JSParseFunctionCode)
</del><ins>+ if (codeType == JSParserCodeType::Function)
</ins><span class="cx"> scope->setIsFunction();
</span><del>- if (strictness == JSParseStrict)
</del><ins>+ if (strictMode == JSParserStrictMode::Strict)
</ins><span class="cx"> scope->setStrictMode();
</span><span class="cx"> if (parameters) {
</span><span class="cx"> bool hadBindingParameters = false;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.h (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/parser/Parser.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -426,7 +426,9 @@
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx">
</span><span class="cx"> public:
</span><del>- Parser(VM*, const SourceCode&, FunctionParameters*, const Identifier&, JSParserStrictness, JSParserMode,
</del><ins>+ Parser(
+ VM*, const SourceCode&, FunctionParameters*, const Identifier&,
+ JSParserBuiltinMode, JSParserStrictMode, JSParserCodeType,
</ins><span class="cx"> ConstructorKind defaultConstructorKind = ConstructorKind::None);
</span><span class="cx"> ~Parser();
</span><span class="cx">
</span><span class="lines">@@ -981,19 +983,23 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <class ParsedNode>
</span><del>-std::unique_ptr<ParsedNode> parse(VM* vm, const SourceCode& source, FunctionParameters* parameters, const Identifier& name,
- JSParserStrictness strictness, JSParserMode parserMode, ParserError& error, JSTextPosition* positionBeforeLastNewline = 0,
- bool needReparsingAdjustment = false, ConstructorKind defaultConstructorKind = ConstructorKind::None)
</del><ins>+std::unique_ptr<ParsedNode> parse(
+ VM* vm, const SourceCode& source, FunctionParameters* parameters,
+ const Identifier& name, JSParserBuiltinMode builtinMode,
+ JSParserStrictMode strictMode, JSParserCodeType codeType,
+ ParserError& error, JSTextPosition* positionBeforeLastNewline = 0,
+ bool needReparsingAdjustment = false,
+ ConstructorKind defaultConstructorKind = ConstructorKind::None)
</ins><span class="cx"> {
</span><span class="cx"> SamplingRegion samplingRegion("Parsing");
</span><span class="cx">
</span><span class="cx"> ASSERT(!source.provider()->source().isNull());
</span><span class="cx"> if (source.provider()->source().is8Bit()) {
</span><del>- Parser<Lexer<LChar>> parser(vm, source, parameters, name, strictness, parserMode, defaultConstructorKind);
</del><ins>+ Parser<Lexer<LChar>> parser(vm, source, parameters, name, builtinMode, strictMode, codeType, defaultConstructorKind);
</ins><span class="cx"> std::unique_ptr<ParsedNode> result = parser.parse<ParsedNode>(error, needReparsingAdjustment);
</span><span class="cx"> if (positionBeforeLastNewline)
</span><span class="cx"> *positionBeforeLastNewline = parser.positionBeforeLastNewline();
</span><del>- if (strictness == JSParseBuiltin) {
</del><ins>+ if (builtinMode == JSParserBuiltinMode::Builtin) {
</ins><span class="cx"> if (!result)
</span><span class="cx"> WTF::dataLog("Error compiling builtin: ", error.message(), "\n");
</span><span class="cx"> RELEASE_ASSERT(result);
</span><span class="lines">@@ -1001,7 +1007,7 @@
</span><span class="cx"> }
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><del>- Parser<Lexer<UChar>> parser(vm, source, parameters, name, strictness, parserMode);
</del><ins>+ Parser<Lexer<UChar>> parser(vm, source, parameters, name, builtinMode, strictMode, codeType);
</ins><span class="cx"> std::unique_ptr<ParsedNode> result = parser.parse<ParsedNode>(error, needReparsingAdjustment);
</span><span class="cx"> if (positionBeforeLastNewline)
</span><span class="cx"> *positionBeforeLastNewline = parser.positionBeforeLastNewline();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParserModesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/ParserModes.h (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/ParserModes.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/parser/ParserModes.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -31,8 +31,9 @@
</span><span class="cx">
</span><span class="cx"> namespace JSC {
</span><span class="cx">
</span><del>-enum JSParserStrictness { JSParseNormal, JSParseBuiltin, JSParseStrict };
-enum JSParserMode { JSParseProgramCode, JSParseFunctionCode };
</del><ins>+enum class JSParserStrictMode { NotStrict, Strict };
+enum class JSParserBuiltinMode { NotBuiltin, Builtin };
+enum class JSParserCodeType { Program, Function };
</ins><span class="cx">
</span><span class="cx"> enum class ConstructorKind { None, Base, Derived };
</span><span class="cx"> enum class SuperBinding { Needed, NotNeeded };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCodeCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CodeCache.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CodeCache.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/CodeCache.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -75,9 +75,9 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template <class UnlinkedCodeBlockType, class ExecutableType>
</span><del>-UnlinkedCodeBlockType* CodeCache::getGlobalCodeBlock(VM& vm, ExecutableType* executable, const SourceCode& source, JSParserStrictness strictness, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error)
</del><ins>+UnlinkedCodeBlockType* CodeCache::getGlobalCodeBlock(VM& vm, ExecutableType* executable, const SourceCode& source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error)
</ins><span class="cx"> {
</span><del>- SourceCodeKey key = SourceCodeKey(source, String(), CacheTypes<UnlinkedCodeBlockType>::codeType, strictness);
</del><ins>+ SourceCodeKey key = SourceCodeKey(source, String(), CacheTypes<UnlinkedCodeBlockType>::codeType, builtinMode, strictMode);
</ins><span class="cx"> SourceCodeValue* cache = m_sourceCode.findCacheAndUpdateAge(key);
</span><span class="cx"> bool canCache = debuggerMode == DebuggerOff && profilerMode == ProfilerOff && !vm.typeProfiler() && !vm.controlFlowProfiler();
</span><span class="cx"> if (cache && canCache) {
</span><span class="lines">@@ -92,7 +92,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> typedef typename CacheTypes<UnlinkedCodeBlockType>::RootNode RootNode;
</span><del>- std::unique_ptr<RootNode> rootNode = parse<RootNode>(&vm, source, 0, Identifier(), strictness, JSParseProgramCode, error);
</del><ins>+ std::unique_ptr<RootNode> rootNode = parse<RootNode>(
+ &vm, source, 0, Identifier(), builtinMode, strictMode,
+ JSParserCodeType::Program, error);
</ins><span class="cx"> if (!rootNode)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="lines">@@ -118,25 +120,31 @@
</span><span class="cx"> return unlinkedCodeBlock;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-UnlinkedProgramCodeBlock* CodeCache::getProgramCodeBlock(VM& vm, ProgramExecutable* executable, const SourceCode& source, JSParserStrictness strictness, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error)
</del><ins>+UnlinkedProgramCodeBlock* CodeCache::getProgramCodeBlock(VM& vm, ProgramExecutable* executable, const SourceCode& source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error)
</ins><span class="cx"> {
</span><del>- return getGlobalCodeBlock<UnlinkedProgramCodeBlock>(vm, executable, source, strictness, debuggerMode, profilerMode, error);
</del><ins>+ return getGlobalCodeBlock<UnlinkedProgramCodeBlock>(vm, executable, source, builtinMode, strictMode, debuggerMode, profilerMode, error);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-UnlinkedEvalCodeBlock* CodeCache::getEvalCodeBlock(VM& vm, EvalExecutable* executable, const SourceCode& source, JSParserStrictness strictness, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error)
</del><ins>+UnlinkedEvalCodeBlock* CodeCache::getEvalCodeBlock(VM& vm, EvalExecutable* executable, const SourceCode& source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error)
</ins><span class="cx"> {
</span><del>- return getGlobalCodeBlock<UnlinkedEvalCodeBlock>(vm, executable, source, strictness, debuggerMode, profilerMode, error);
</del><ins>+ return getGlobalCodeBlock<UnlinkedEvalCodeBlock>(vm, executable, source, builtinMode, strictMode, debuggerMode, profilerMode, error);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> UnlinkedFunctionExecutable* CodeCache::getFunctionExecutableFromGlobalCode(VM& vm, const Identifier& name, const SourceCode& source, ParserError& error)
</span><span class="cx"> {
</span><del>- SourceCodeKey key = SourceCodeKey(source, name.string(), SourceCodeKey::FunctionType, JSParseNormal);
</del><ins>+ SourceCodeKey key = SourceCodeKey(
+ source, name.string(), SourceCodeKey::FunctionType,
+ JSParserBuiltinMode::NotBuiltin,
+ JSParserStrictMode::NotStrict);
</ins><span class="cx"> SourceCodeValue* cache = m_sourceCode.findCacheAndUpdateAge(key);
</span><span class="cx"> if (cache)
</span><span class="cx"> return jsCast<UnlinkedFunctionExecutable*>(cache->cell.get());
</span><span class="cx">
</span><span class="cx"> JSTextPosition positionBeforeLastNewline;
</span><del>- std::unique_ptr<ProgramNode> program = parse<ProgramNode>(&vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error, &positionBeforeLastNewline);
</del><ins>+ std::unique_ptr<ProgramNode> program = parse<ProgramNode>(
+ &vm, source, 0, Identifier(), JSParserBuiltinMode::NotBuiltin,
+ JSParserStrictMode::NotStrict, JSParserCodeType::Program,
+ error, &positionBeforeLastNewline);
</ins><span class="cx"> if (!program) {
</span><span class="cx"> RELEASE_ASSERT(error.isValid());
</span><span class="cx"> return nullptr;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCodeCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CodeCache.h (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CodeCache.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/CodeCache.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -61,10 +61,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- SourceCodeKey(const SourceCode& sourceCode, const String& name, CodeType codeType, JSParserStrictness jsParserStrictness)
</del><ins>+ SourceCodeKey(const SourceCode& sourceCode, const String& name, CodeType codeType, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode)
</ins><span class="cx"> : m_sourceCode(sourceCode)
</span><span class="cx"> , m_name(name)
</span><del>- , m_flags((codeType << 2) | jsParserStrictness)
</del><ins>+ , m_flags(
+ (static_cast<unsigned>(codeType) << 2)
+ | (static_cast<unsigned>(builtinMode) << 1)
+ | static_cast<unsigned>(strictMode))
</ins><span class="cx"> , m_hash(string().impl()->hash())
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -249,8 +252,8 @@
</span><span class="cx"> CodeCache();
</span><span class="cx"> ~CodeCache();
</span><span class="cx">
</span><del>- UnlinkedProgramCodeBlock* getProgramCodeBlock(VM&, ProgramExecutable*, const SourceCode&, JSParserStrictness, DebuggerMode, ProfilerMode, ParserError&);
- UnlinkedEvalCodeBlock* getEvalCodeBlock(VM&, EvalExecutable*, const SourceCode&, JSParserStrictness, DebuggerMode, ProfilerMode, ParserError&);
</del><ins>+ UnlinkedProgramCodeBlock* getProgramCodeBlock(VM&, ProgramExecutable*, const SourceCode&, JSParserBuiltinMode, JSParserStrictMode, DebuggerMode, ProfilerMode, ParserError&);
+ UnlinkedEvalCodeBlock* getEvalCodeBlock(VM&, EvalExecutable*, const SourceCode&, JSParserBuiltinMode, JSParserStrictMode, DebuggerMode, ProfilerMode, ParserError&);
</ins><span class="cx"> UnlinkedFunctionExecutable* getFunctionExecutableFromGlobalCode(VM&, const Identifier&, const SourceCode&, ParserError&);
</span><span class="cx">
</span><span class="cx"> void clear()
</span><span class="lines">@@ -260,7 +263,7 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> template <class UnlinkedCodeBlockType, class ExecutableType>
</span><del>- UnlinkedCodeBlockType* getGlobalCodeBlock(VM&, ExecutableType*, const SourceCode&, JSParserStrictness, DebuggerMode, ProfilerMode, ParserError&);
</del><ins>+ UnlinkedCodeBlockType* getGlobalCodeBlock(VM&, ExecutableType*, const SourceCode&, JSParserBuiltinMode, JSParserStrictMode, DebuggerMode, ProfilerMode, ParserError&);
</ins><span class="cx">
</span><span class="cx"> CodeCacheMap m_sourceCode;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCompletioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Completion.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Completion.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/Completion.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -55,7 +55,9 @@
</span><span class="cx"> {
</span><span class="cx"> JSLockHolder lock(vm);
</span><span class="cx"> RELEASE_ASSERT(vm.atomicStringTable() == wtfThreadData().atomicStringTable());
</span><del>- return !!parse<ProgramNode>(&vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error);
</del><ins>+ return !!parse<ProgramNode>(
+ &vm, source, 0, Identifier(), JSParserBuiltinMode::NotBuiltin,
+ JSParserStrictMode::NotStrict, JSParserCodeType::Program, error);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> JSValue evaluate(ExecState* exec, const SourceCode& source, JSValue thisValue, JSValue* returnedException)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/Executable.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -394,7 +394,10 @@
</span><span class="cx">
</span><span class="cx"> const ClassInfo FunctionExecutable::s_info = { "FunctionExecutable", &ScriptExecutable::s_info, 0, CREATE_METHOD_TABLE(FunctionExecutable) };
</span><span class="cx">
</span><del>-FunctionExecutable::FunctionExecutable(VM& vm, const SourceCode& source, UnlinkedFunctionExecutable* unlinkedExecutable, unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn, bool bodyIncludesBraces)
</del><ins>+FunctionExecutable::FunctionExecutable(VM& vm, const SourceCode& source,
+ UnlinkedFunctionExecutable* unlinkedExecutable, unsigned firstLine,
+ unsigned lastLine, unsigned startColumn, unsigned endColumn,
+ bool bodyIncludesBraces)
</ins><span class="cx"> : ScriptExecutable(vm.functionExecutableStructure.get(), vm, source, unlinkedExecutable->isInStrictContext())
</span><span class="cx"> , m_unlinkedExecutable(vm, this, unlinkedExecutable)
</span><span class="cx"> , m_bodyIncludesBraces(bodyIncludesBraces)
</span><span class="lines">@@ -465,7 +468,9 @@
</span><span class="cx"> ParserError error;
</span><span class="cx"> VM* vm = &exec->vm();
</span><span class="cx"> JSGlobalObject* lexicalGlobalObject = exec->lexicalGlobalObject();
</span><del>- std::unique_ptr<ProgramNode> programNode = parse<ProgramNode>(vm, m_source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error);
</del><ins>+ std::unique_ptr<ProgramNode> programNode = parse<ProgramNode>(
+ vm, m_source, 0, Identifier(), JSParserBuiltinMode::NotBuiltin,
+ JSParserStrictMode::NotStrict, JSParserCodeType::Program, error);
</ins><span class="cx"> if (programNode)
</span><span class="cx"> return 0;
</span><span class="cx"> ASSERT(error.isValid());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.h (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/Executable.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -541,7 +541,10 @@
</span><span class="cx"> public:
</span><span class="cx"> typedef ScriptExecutable Base;
</span><span class="cx">
</span><del>- static FunctionExecutable* create(VM& vm, const SourceCode& source, UnlinkedFunctionExecutable* unlinkedExecutable, unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn, bool bodyIncludesBraces = true)
</del><ins>+ static FunctionExecutable* create(
+ VM& vm, const SourceCode& source, UnlinkedFunctionExecutable* unlinkedExecutable,
+ unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn,
+ bool bodyIncludesBraces = true)
</ins><span class="cx"> {
</span><span class="cx"> FunctionExecutable* executable = new (NotNull, allocateCell<FunctionExecutable>(vm.heap)) FunctionExecutable(vm, source, unlinkedExecutable, firstLine, lastLine, startColumn, endColumn, bodyIncludesBraces);
</span><span class="cx"> executable->finishCreation(vm);
</span><span class="lines">@@ -643,7 +646,10 @@
</span><span class="cx"> bool bodyIncludesBraces() const { return m_bodyIncludesBraces; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- FunctionExecutable(VM&, const SourceCode&, UnlinkedFunctionExecutable*, unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn, bool bodyIncludesBraces);
</del><ins>+ FunctionExecutable(
+ VM&, const SourceCode&, UnlinkedFunctionExecutable*, unsigned firstLine,
+ unsigned lastLine, unsigned startColumn, unsigned endColumn,
+ bool bodyIncludesBraces);
</ins><span class="cx">
</span><span class="cx"> bool isCompiling()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -783,10 +783,12 @@
</span><span class="cx"> UnlinkedProgramCodeBlock* JSGlobalObject::createProgramCodeBlock(CallFrame* callFrame, ProgramExecutable* executable, JSObject** exception)
</span><span class="cx"> {
</span><span class="cx"> ParserError error;
</span><del>- JSParserStrictness strictness = executable->isStrictMode() ? JSParseStrict : JSParseNormal;
</del><ins>+ JSParserStrictMode strictMode = executable->isStrictMode() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
</ins><span class="cx"> DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff;
</span><span class="cx"> ProfilerMode profilerMode = hasProfiler() ? ProfilerOn : ProfilerOff;
</span><del>- UnlinkedProgramCodeBlock* unlinkedCodeBlock = vm().codeCache()->getProgramCodeBlock(vm(), executable, executable->source(), strictness, debuggerMode, profilerMode, error);
</del><ins>+ UnlinkedProgramCodeBlock* unlinkedCodeBlock = vm().codeCache()->getProgramCodeBlock(
+ vm(), executable, executable->source(), JSParserBuiltinMode::NotBuiltin, strictMode,
+ debuggerMode, profilerMode, error);
</ins><span class="cx">
</span><span class="cx"> if (hasDebugger())
</span><span class="cx"> debugger()->sourceParsed(callFrame, executable->source().provider(), error.line(), error.message());
</span><span class="lines">@@ -802,10 +804,12 @@
</span><span class="cx"> UnlinkedEvalCodeBlock* JSGlobalObject::createEvalCodeBlock(CallFrame* callFrame, EvalExecutable* executable)
</span><span class="cx"> {
</span><span class="cx"> ParserError error;
</span><del>- JSParserStrictness strictness = executable->isStrictMode() ? JSParseStrict : JSParseNormal;
</del><ins>+ JSParserStrictMode strictMode = executable->isStrictMode() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
</ins><span class="cx"> DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff;
</span><span class="cx"> ProfilerMode profilerMode = hasProfiler() ? ProfilerOn : ProfilerOff;
</span><del>- UnlinkedEvalCodeBlock* unlinkedCodeBlock = vm().codeCache()->getEvalCodeBlock(vm(), executable, executable->source(), strictness, debuggerMode, profilerMode, error);
</del><ins>+ UnlinkedEvalCodeBlock* unlinkedCodeBlock = vm().codeCache()->getEvalCodeBlock(
+ vm(), executable, executable->source(), JSParserBuiltinMode::NotBuiltin, strictMode,
+ debuggerMode, profilerMode, error);
</ins><span class="cx">
</span><span class="cx"> if (hasDebugger())
</span><span class="cx"> debugger()->sourceParsed(callFrame, executable->source().provider(), error.line(), error.message());
</span></span></pre>
</div>
</div>
</body>
</html>