Changeset 262165 in webkit for trunk/Source/JavaScriptCore/bytecompiler
- Timestamp:
- May 26, 2020, 3:16:10 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r262083 r262165 4083 4083 restoreScopeRegister(); 4084 4084 4085 Ref<Label> finallyDone = newLabel();4086 4087 RefPtr<RegisterID> returnMethod = emitGetById(newTemporary(), iterator.get(), propertyNames().returnKeyword);4088 emitJumpIfTrue(emitIsUndefined(newTemporary(), returnMethod.get()), finallyDone.get());4089 4090 4085 Ref<Label> returnCallTryStart = newLabel(); 4091 4086 emitLabel(returnCallTryStart.get()); 4092 4087 TryData* returnCallTryData = pushTry(returnCallTryStart.get(), catchLabel.get(), HandlerType::SynthesizedCatch); 4093 4088 4094 CallArguments returnArguments(*this, nullptr); 4095 move(returnArguments.thisRegister(), iterator.get()); 4096 emitCall(value.get(), returnMethod.get(), NoExpectedFunction, returnArguments, node->divot(), node->divotStart(), node->divotEnd(), DebuggableCall::No); 4097 4098 if (isForAwait) 4099 emitAwait(value.get()); 4100 4101 emitJumpIfTrue(emitIsObject(newTemporary(), value.get()), finallyDone.get()); 4102 emitThrowTypeError("Iterator result interface is not an object."_s); 4103 4104 emitLabel(finallyDone.get()); 4089 emitIteratorGenericClose(iterator.get(), node, shouldEmitAwait); 4090 Ref<Label> finallyDone = newEmittedLabel(); 4105 4091 emitFinallyCompletion(finallyContext, endCatchLabel.get()); 4106 4092 … … 4239 4225 restoreScopeRegister(); 4240 4226 4241 Ref<Label> finallyDone = newLabel();4242 4243 RefPtr<RegisterID> returnMethod = emitGetById(newTemporary(), iterator.get(), propertyNames().returnKeyword);4244 emitJumpIfTrue(emitIsUndefined(newTemporary(), returnMethod.get()), finallyDone.get());4245 4246 4227 Ref<Label> returnCallTryStart = newLabel(); 4247 4228 emitLabel(returnCallTryStart.get()); 4248 4229 TryData* returnCallTryData = pushTry(returnCallTryStart.get(), catchLabel.get(), HandlerType::SynthesizedCatch); 4249 4230 4250 CallArguments returnArguments(*this, nullptr); 4251 move(returnArguments.thisRegister(), iterator.get()); 4252 emitCall(value.get(), returnMethod.get(), NoExpectedFunction, returnArguments, node->divot(), node->divotStart(), node->divotEnd(), DebuggableCall::No); 4253 4254 emitJumpIfTrue(emitIsObject(newTemporary(), value.get()), finallyDone.get()); 4255 emitThrowTypeError("Iterator result interface is not an object."_s); 4256 4257 emitLabel(finallyDone.get()); 4231 emitIteratorGenericClose(iterator.get(), node, EmitAwait::No); 4232 Ref<Label> finallyDone = newEmittedLabel(); 4258 4233 emitFinallyCompletion(finallyContext, endCatchLabel.get()); 4259 4234
Note:
See TracChangeset
for help on using the changeset viewer.