Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| index 1d66cb51ee67accab7f1975e5b3c9ce5f2ca86a4..8c1777f9dd1fa86fdda0a2c650d0c76fe69d9c1b 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| @@ -1244,14 +1244,25 @@ $lazyInitializerLogic |
| } |
| void emitStaticFunctionWithNamer(CodeBuffer buffer, |
| - Element element, |
| + FunctionElement element, |
| CodeBuffer functionBuffer, |
| String functionNamer(Element element)) { |
| String functionName = functionNamer(element); |
| buffer.add('$isolateProperties.$functionName$_=$_'); |
| buffer.add(functionBuffer); |
| buffer.add('$N$n'); |
| + for (TypedefElement typedef in checkedTypedefs) { |
|
ngeoffray
2012/12/13 12:38:57
This will add is checks to all static functions. Y
karlklose
2012/12/13 13:08:46
Done.
|
| + FunctionType typedefType = |
| + typedef.computeType(compiler).unalias(compiler); |
| + if (compiler.types.isSubtype(element.computeType(compiler), |
| + typedefType)) { |
| + String typedefName = namer.getName(typedef); |
| + buffer.add('$isolateProperties.$functionName' |
| + '.is\$$typedefName$_=${_}true$N'); |
| + } |
| + } |
| } |
| + |
| void emitStaticFunctionsWithNamer(CodeBuffer buffer, |
| Map<Element, CodeBuffer> generatedCode, |
| String functionNamer(Element element)) { |