ecma标准文档阅读问题,一个隐藏操作前面带一个问号表示什么意思?

https://tc39.github.io/ecma262/#sec-bitwise-not-operator

    Runtime Semantics: Evaluation#
    
    UnaryExpression:~UnaryExpression
    Let expr be the result of evaluating UnaryExpression.
    Let oldValue be ? ToInt32(? GetValue(expr)).
    Return the result of applying bitwise complement to oldValue. The result is a signed 32-bit integer.
    

这里面 ? GetValue(expr) 前面为什么要带个问号?表示什么意思? ? ToInt32前面也带了。

阅读 2.2k
1 个回答

自己找到了

https://tc39.github.io/ecma262/#sec-algorithm-conventions

    Abstract operations referenced using the functional application style and the method application style that are prefixed by ? indicate that ReturnIfAbrupt should be applied to the resulting Completion Record. For example, ? operationName() is equivalent to ReturnIfAbrupt(operationName()). Similarly, ? someValue.operationName() is equivalent to ReturnIfAbrupt(someValue.operationName()).
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进