| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/ast.h" | 5 #include "vm/ast.h" |
| 6 #include "vm/compiler.h" | 6 #include "vm/compiler.h" |
| 7 #include "vm/dart_entry.h" | 7 #include "vm/dart_entry.h" |
| 8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
| 9 #include "vm/object_store.h" | 9 #include "vm/object_store.h" |
| 10 #include "vm/resolver.h" | 10 #include "vm/resolver.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 return false; | 237 return false; |
| 238 } | 238 } |
| 239 } | 239 } |
| 240 | 240 |
| 241 | 241 |
| 242 const char* BinaryOpNode::Name() const { | 242 const char* BinaryOpNode::Name() const { |
| 243 return Token::Str(kind_); | 243 return Token::Str(kind_); |
| 244 } | 244 } |
| 245 | 245 |
| 246 | 246 |
| 247 const char* BinaryOpWithMask32Node::Name() const { |
| 248 return Token::Str(kind()); |
| 249 } |
| 250 |
| 251 |
| 247 bool BinaryOpNode::IsPotentiallyConst() const { | 252 bool BinaryOpNode::IsPotentiallyConst() const { |
| 248 switch (kind_) { | 253 switch (kind_) { |
| 249 case Token::kADD: | 254 case Token::kADD: |
| 250 case Token::kSUB: | 255 case Token::kSUB: |
| 251 case Token::kMUL: | 256 case Token::kMUL: |
| 252 case Token::kDIV: | 257 case Token::kDIV: |
| 253 case Token::kMOD: | 258 case Token::kMOD: |
| 254 case Token::kTRUNCDIV: | 259 case Token::kTRUNCDIV: |
| 255 case Token::kBIT_OR: | 260 case Token::kBIT_OR: |
| 256 case Token::kBIT_XOR: | 261 case Token::kBIT_XOR: |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 if (result.IsError() || result.IsNull()) { | 555 if (result.IsError() || result.IsNull()) { |
| 551 // TODO(turnidge): We could get better error messages by returning | 556 // TODO(turnidge): We could get better error messages by returning |
| 552 // the Error object directly to the parser. This will involve | 557 // the Error object directly to the parser. This will involve |
| 553 // replumbing all of the EvalConstExpr methods. | 558 // replumbing all of the EvalConstExpr methods. |
| 554 return NULL; | 559 return NULL; |
| 555 } | 560 } |
| 556 return &Instance::ZoneHandle(Instance::Cast(result).raw()); | 561 return &Instance::ZoneHandle(Instance::Cast(result).raw()); |
| 557 } | 562 } |
| 558 | 563 |
| 559 } // namespace dart | 564 } // namespace dart |
| OLD | NEW |