Rename JSBigMmapString -> JSBigOptimizedBundleString

Summary:
`JSBigMmapString` needs to know too much about the details of the "optimized bundle" format. In honour of this fact, I'm renaming it to `JSBigOptimizedBundleString`. In a following diff, I will introduce a new class just for File-backed Strings, whose only responsibility is dealing with an mmaped region.

This diff already pulls in some fixes for formatting reference and pointer declarations from the linter.

Reviewed By: michalgr

Differential Revision: D4189391

fbshipit-source-id: b376c2a8d9ae5b83575da8457e607bbbfc648ebd
This commit is contained in:
Ashok Menon
2016-11-16 15:13:39 -08:00
committed by Facebook Github Bot
parent 89d81b34db
commit 79fa6d41a1
3 changed files with 14 additions and 16 deletions
+2 -2
View File
@@ -334,8 +334,8 @@ void JSCExecutor::loadApplicationScript(
"Could not create compiled source code"
);
} else {
auto jsScriptBigString = JSBigMmapString::fromOptimizedBundle(bundlePath);
if (jsScriptBigString->encoding() != JSBigMmapString::Encoding::Ascii) {
auto jsScriptBigString = JSBigOptimizedBundleString::fromOptimizedBundle(bundlePath);
if (!jsScriptBigString->isAscii()) {
LOG(WARNING) << "Bundle is not ASCII encoded - falling back to the slow path";
return loadApplicationScript(std::move(jsScriptBigString), sourceURL);
}