Revert D8321765: [PrePack]Emit PrePack information as global into bundle (optionally)

Differential Revision:
D8321765

Original commit changeset: 03a41b2cef84

fbshipit-source-id: e5f243a4270b975feb48ef6553092e3520de085d
This commit is contained in:
Joel Beales 2018-06-12 22:11:19 -07:00 committed by Facebook Github Bot
parent 3bd3ecc072
commit e8bbe014af
4 changed files with 0 additions and 24 deletions

View File

@ -92,7 +92,6 @@ export type SerializerOptions = {
inlineExpressions?: boolean,
trace?: boolean,
heapGraphFormat?: "DotLanguage" | "VISJS",
prepackInfo?: boolean,
};
export type PartialEvaluatorOptions = {

View File

@ -80,7 +80,6 @@ function run(
--repro Create a zip file with all information needed to reproduce a Prepack run"
--cpuprofile Create a CPU profile file for the run that can be loaded into the Chrome JavaScript CPU Profile viewer",
--debugDiagnosticSeverity FatalError | RecoverableError | Warning | Information (default = FatalError). Diagnostic level at which debugger will stop
--prepackInfo Emit a global variable with information about the corresponding PrePack run.
`;
let args = Array.from(process.argv);
args.splice(0, 2);
@ -121,7 +120,6 @@ function run(
residual: false,
profile: false,
reactEnabled: false,
prepackInfo: false,
};
let reproArguments = [];
@ -358,7 +356,6 @@ fi
},
flags
);
if (heapGraphFilePath !== undefined) resolvedOptions.heapGraphFormat = "DotLanguage";
if (lazyObjectsRuntime !== undefined && (resolvedOptions.delayInitializations || resolvedOptions.inlineExpressions)) {
console.error("lazy objects feature is incompatible with delayInitializations and inlineExpressions options");

View File

@ -65,7 +65,6 @@ export type PrepackOptions = {|
debugOutFilePath?: string,
abstractValueImpliesMax?: number,
debuggerConfigArgs?: DebuggerConfigArguments,
prepackInfo?: boolean,
|};
export function getRealmOptions({
@ -131,7 +130,6 @@ export function getSerializerOptions({
inlineExpressions = false,
initializeMoreModules = false,
trace = false,
prepackInfo = false,
}: PrepackOptions): SerializerOptions {
let result: SerializerOptions = {
delayInitializations,
@ -146,7 +144,6 @@ export function getSerializerOptions({
profile,
inlineExpressions,
trace,
prepackInfo,
};
if (lazyObjectsRuntime !== undefined) {
result.lazyObjectsRuntime = lazyObjectsRuntime;

View File

@ -2236,23 +2236,6 @@ export class ResidualHeapSerializer {
);
}
if (this._options.prepackInfo) {
this.emitter.emit(
t.expressionStatement(
t.assignmentExpression(
"=",
this.preludeGenerator.globalReference("__PREPACK__", false),
t.objectExpression([
t.objectProperty(
t.identifier("lazyObjects"),
t.booleanLiteral(this._options.lazyObjectsRuntime !== undefined)
),
])
)
)
);
}
this.postGeneratorSerialization();
Array.prototype.push.apply(this.prelude, this.preludeGenerator.prelude);