MCPcopy
hub / github.com/lutzroeder/netron / emitExpr

Method emitExpr

source/python.js:17398–17405  ·  view source on GitHub ↗
(tree, type_hint)

Source from the content-addressed store, hash-verified

17396 return this.getNamedValues(trees, maybe_unpack).map((value) => value.value(this.graph));
17397 }
17398 emitExpr(tree, type_hint) {
17399 type_hint = type_hint || null;
17400 let out_val = this.emitSugaredExpr(tree, 1, type_hint).asValue(tree, this.method);
17401 if (type_hint === torch.AnyType.get() && out_val.type() !== torch.AnyType.get()) {
17402 out_val = this.graph.insertUncheckedCast(out_val, type_hint);
17403 }
17404 return out_val;
17405 }
17406 emitSugaredExpr(tree, n_binders, type_hint) {
17407 if (tree instanceof ast.Name) { // TK_VAR
17408 return this.environment_stack.getSugaredVar(tree.id);

Callers 11

emitWithMethod · 0.80
emitLoopCommonMethod · 0.80
emitIsInstanceMethod · 0.80
emitCondExprMethod · 0.80
emitReturnMethod · 0.80
getNamedValuesMethod · 0.80
emitAttributesMethod · 0.80
emitApplySpecialFormMethod · 0.80
emitDictLiteralMethod · 0.80
emitSliceMethod · 0.80
emitSubscriptMethod · 0.80

Calls 5

asValueMethod · 0.80
emitSugaredExprMethod · 0.80
insertUncheckedCastMethod · 0.80
getMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected