[parser] Name outer promise ".promise" in the desugaring.
The Parser inserts a temporary .promise variable to hold the outer promise for async functions, but doesn't assign an actually visible name to it. This change puts the name ".promise" on it (similar to what we do for other special variables like .result), which makes it easier to debug this (for V8 developers). It's not observable to regular developers. Bug: v8:7522, v8:8015 Change-Id: I388352ad931a49102cb5afe350314337a505a150 Reviewed-on: https://chromium-review.googlesource.com/1249106 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#56276}
This commit is contained in:
parent
d2e0166ded
commit
bd68cc8234
@ -208,6 +208,7 @@ class AstBigInt {
|
||||
F(dot_for, ".for") \
|
||||
F(dot_generator_object, ".generator_object") \
|
||||
F(dot_iterator, ".iterator") \
|
||||
F(dot_promise, ".promise") \
|
||||
F(dot_result, ".result") \
|
||||
F(dot_switch_tag, ".switch_tag") \
|
||||
F(dot_catch, ".catch") \
|
||||
|
@ -69,6 +69,7 @@
|
||||
V(_, dot_for_string, ".for") \
|
||||
V(_, dot_generator_object_string, ".generator_object") \
|
||||
V(_, dot_iterator_string, ".iterator") \
|
||||
V(_, dot_promise_string, ".promise") \
|
||||
V(_, dot_result_string, ".result") \
|
||||
V(_, dot_string, ".") \
|
||||
V(_, dot_switch_tag_string, ".switch_tag") \
|
||||
|
@ -2955,7 +2955,7 @@ Variable* Parser::PromiseVariable() {
|
||||
Variable* promise = function_state_->scope()->promise_var();
|
||||
if (promise == nullptr) {
|
||||
promise = function_state_->scope()->DeclarePromiseVar(
|
||||
ast_value_factory()->empty_string());
|
||||
ast_value_factory()->dot_promise_string());
|
||||
}
|
||||
return promise;
|
||||
}
|
||||
|
@ -288,41 +288,41 @@ KNOWN_MAPS = {
|
||||
("RO_SPACE", 0x04711): (171, "Tuple2Map"),
|
||||
("RO_SPACE", 0x047b1): (173, "ArrayBoilerplateDescriptionMap"),
|
||||
("RO_SPACE", 0x04aa1): (161, "InterceptorInfoMap"),
|
||||
("RO_SPACE", 0x06d11): (153, "AccessCheckInfoMap"),
|
||||
("RO_SPACE", 0x06d61): (154, "AccessorInfoMap"),
|
||||
("RO_SPACE", 0x06db1): (155, "AccessorPairMap"),
|
||||
("RO_SPACE", 0x06e01): (156, "AliasedArgumentsEntryMap"),
|
||||
("RO_SPACE", 0x06e51): (157, "AllocationMementoMap"),
|
||||
("RO_SPACE", 0x06ea1): (158, "AsyncGeneratorRequestMap"),
|
||||
("RO_SPACE", 0x06ef1): (159, "DebugInfoMap"),
|
||||
("RO_SPACE", 0x06f41): (160, "FunctionTemplateInfoMap"),
|
||||
("RO_SPACE", 0x06f91): (162, "InterpreterDataMap"),
|
||||
("RO_SPACE", 0x06fe1): (163, "ModuleInfoEntryMap"),
|
||||
("RO_SPACE", 0x07031): (164, "ModuleMap"),
|
||||
("RO_SPACE", 0x07081): (165, "ObjectTemplateInfoMap"),
|
||||
("RO_SPACE", 0x070d1): (166, "PromiseCapabilityMap"),
|
||||
("RO_SPACE", 0x07121): (167, "PromiseReactionMap"),
|
||||
("RO_SPACE", 0x07171): (168, "PrototypeInfoMap"),
|
||||
("RO_SPACE", 0x071c1): (169, "ScriptMap"),
|
||||
("RO_SPACE", 0x07211): (170, "StackFrameInfoMap"),
|
||||
("RO_SPACE", 0x07261): (172, "Tuple3Map"),
|
||||
("RO_SPACE", 0x072b1): (174, "WasmDebugInfoMap"),
|
||||
("RO_SPACE", 0x07301): (175, "WasmExportedFunctionDataMap"),
|
||||
("RO_SPACE", 0x07351): (176, "CallableTaskMap"),
|
||||
("RO_SPACE", 0x073a1): (177, "CallbackTaskMap"),
|
||||
("RO_SPACE", 0x073f1): (178, "PromiseFulfillReactionJobTaskMap"),
|
||||
("RO_SPACE", 0x07441): (179, "PromiseRejectReactionJobTaskMap"),
|
||||
("RO_SPACE", 0x07491): (180, "PromiseResolveThenableJobTaskMap"),
|
||||
("RO_SPACE", 0x074e1): (181, "MicrotaskQueueMap"),
|
||||
("RO_SPACE", 0x07531): (182, "AllocationSiteWithWeakNextMap"),
|
||||
("RO_SPACE", 0x07581): (182, "AllocationSiteWithoutWeakNextMap"),
|
||||
("RO_SPACE", 0x075d1): (213, "LoadHandler1Map"),
|
||||
("RO_SPACE", 0x07621): (213, "LoadHandler2Map"),
|
||||
("RO_SPACE", 0x07671): (213, "LoadHandler3Map"),
|
||||
("RO_SPACE", 0x076c1): (220, "StoreHandler0Map"),
|
||||
("RO_SPACE", 0x07711): (220, "StoreHandler1Map"),
|
||||
("RO_SPACE", 0x07761): (220, "StoreHandler2Map"),
|
||||
("RO_SPACE", 0x077b1): (220, "StoreHandler3Map"),
|
||||
("RO_SPACE", 0x06d29): (153, "AccessCheckInfoMap"),
|
||||
("RO_SPACE", 0x06d79): (154, "AccessorInfoMap"),
|
||||
("RO_SPACE", 0x06dc9): (155, "AccessorPairMap"),
|
||||
("RO_SPACE", 0x06e19): (156, "AliasedArgumentsEntryMap"),
|
||||
("RO_SPACE", 0x06e69): (157, "AllocationMementoMap"),
|
||||
("RO_SPACE", 0x06eb9): (158, "AsyncGeneratorRequestMap"),
|
||||
("RO_SPACE", 0x06f09): (159, "DebugInfoMap"),
|
||||
("RO_SPACE", 0x06f59): (160, "FunctionTemplateInfoMap"),
|
||||
("RO_SPACE", 0x06fa9): (162, "InterpreterDataMap"),
|
||||
("RO_SPACE", 0x06ff9): (163, "ModuleInfoEntryMap"),
|
||||
("RO_SPACE", 0x07049): (164, "ModuleMap"),
|
||||
("RO_SPACE", 0x07099): (165, "ObjectTemplateInfoMap"),
|
||||
("RO_SPACE", 0x070e9): (166, "PromiseCapabilityMap"),
|
||||
("RO_SPACE", 0x07139): (167, "PromiseReactionMap"),
|
||||
("RO_SPACE", 0x07189): (168, "PrototypeInfoMap"),
|
||||
("RO_SPACE", 0x071d9): (169, "ScriptMap"),
|
||||
("RO_SPACE", 0x07229): (170, "StackFrameInfoMap"),
|
||||
("RO_SPACE", 0x07279): (172, "Tuple3Map"),
|
||||
("RO_SPACE", 0x072c9): (174, "WasmDebugInfoMap"),
|
||||
("RO_SPACE", 0x07319): (175, "WasmExportedFunctionDataMap"),
|
||||
("RO_SPACE", 0x07369): (176, "CallableTaskMap"),
|
||||
("RO_SPACE", 0x073b9): (177, "CallbackTaskMap"),
|
||||
("RO_SPACE", 0x07409): (178, "PromiseFulfillReactionJobTaskMap"),
|
||||
("RO_SPACE", 0x07459): (179, "PromiseRejectReactionJobTaskMap"),
|
||||
("RO_SPACE", 0x074a9): (180, "PromiseResolveThenableJobTaskMap"),
|
||||
("RO_SPACE", 0x074f9): (181, "MicrotaskQueueMap"),
|
||||
("RO_SPACE", 0x07549): (182, "AllocationSiteWithWeakNextMap"),
|
||||
("RO_SPACE", 0x07599): (182, "AllocationSiteWithoutWeakNextMap"),
|
||||
("RO_SPACE", 0x075e9): (213, "LoadHandler1Map"),
|
||||
("RO_SPACE", 0x07639): (213, "LoadHandler2Map"),
|
||||
("RO_SPACE", 0x07689): (213, "LoadHandler3Map"),
|
||||
("RO_SPACE", 0x076d9): (220, "StoreHandler0Map"),
|
||||
("RO_SPACE", 0x07729): (220, "StoreHandler1Map"),
|
||||
("RO_SPACE", 0x07779): (220, "StoreHandler2Map"),
|
||||
("RO_SPACE", 0x077c9): (220, "StoreHandler3Map"),
|
||||
("MAP_SPACE", 0x02201): (1057, "ExternalMap"),
|
||||
("MAP_SPACE", 0x02251): (1072, "JSMessageObjectMap"),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user