Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: dart/frog/leg/ssa/codegen.dart

Issue 9724032: Resolve type Dynamic and implement black listing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/frog/leg/ssa/closure.dart ('k') | dart/frog/leg/warnings.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/ssa/codegen.dart
diff --git a/dart/frog/leg/ssa/codegen.dart b/dart/frog/leg/ssa/codegen.dart
index 957f323e3b23d09d2cf2a6b85a1e072f17fd657f..40edd486ab7d937b5e2d14cc9643ef025b047605 100644
--- a/dart/frog/leg/ssa/codegen.dart
+++ b/dart/frog/leg/ssa/codegen.dart
@@ -993,20 +993,20 @@ class SsaCodeGenerator implements HVisitor {
checkNull(input);
buffer.add(' || ');
}
- if (element == objectClass) {
+ if (element === objectClass || element === compiler.dynamicClass) {
// TODO(ahe): This probably belongs in the constant folder.
buffer.add('true');
- } else if (element == coreLibrary.find(const SourceString('String'))) {
+ } else if (element == compiler.stringClass) {
checkString(input, '===');
- } else if (element == coreLibrary.find(const SourceString('double'))) {
+ } else if (element == compiler.doubleClass) {
checkDouble(input, '===');
- } else if (element == coreLibrary.find(const SourceString('num'))) {
+ } else if (element == compiler.numClass) {
checkNum(input, '===');
- } else if (element == coreLibrary.find(const SourceString('bool'))) {
+ } else if (element == compiler.boolClass) {
checkBool(input, '===');
- } else if (element == coreLibrary.find(const SourceString('Function'))) {
+ } else if (element == compiler.functionClass) {
checkFunction(input, element);
- } else if (element == coreLibrary.find(const SourceString('int'))) {
+ } else if (element == compiler.intClass) {
beginExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE);
checkNum(input, '===');
buffer.add(' && ');
« no previous file with comments | « dart/frog/leg/ssa/closure.dart ('k') | dart/frog/leg/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698