Chromium Code Reviews| Index: dart/frog/leg/ssa/codegen.dart |
| diff --git a/dart/frog/leg/ssa/codegen.dart b/dart/frog/leg/ssa/codegen.dart |
| index 7921553b4d9fb8a9449943a6aa370a594a6e9e35..46b705d5e7a4c11cd9bf63c57b29dd14523e2ad4 100644 |
| --- a/dart/frog/leg/ssa/codegen.dart |
| +++ b/dart/frog/leg/ssa/codegen.dart |
| @@ -929,6 +929,10 @@ class SsaCodeGenerator implements HVisitor { |
| LibraryElement coreLibrary = compiler.coreLibrary; |
| ClassElement objectClass = coreLibrary.find(const SourceString('Object')); |
| HInstruction input = node.expression; |
| + if (node.nullOk) { |
| + use(input, JSPrecedence.LOGICAL_OR_PRECEDENCE); |
|
Lasse Reichstein Nielsen
2012/03/01 08:38:17
That should be EQUALITY_PRECEDENCE. It's the left
ahe
2012/03/06 10:16:01
Done.
|
| + buffer.add(' === (void 0) ||'); |
|
ahe
2012/02/29 20:44:20
I think this will work well for checked mode as we
|
| + } |
|
Lasse Reichstein Nielsen
2012/03/02 09:44:09
This also changes the expected precedence for the
ahe
2012/03/06 10:16:01
Done.
|
| if (element == objectClass) { |
| // TODO(ahe): This probably belongs in the constant folder. |
| buffer.add('true'); |