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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 case Token::kBIT_NOT: | 279 case Token::kBIT_NOT: |
280 return val->IsInteger() ? val : NULL; | 280 return val->IsInteger() ? val : NULL; |
281 default: | 281 default: |
282 return NULL; | 282 return NULL; |
283 } | 283 } |
284 } | 284 } |
285 | 285 |
286 | 286 |
287 const Instance* ClosureNode::EvalConstExpr() const { | 287 const Instance* ClosureNode::EvalConstExpr() const { |
288 if (function().IsImplicitStaticClosureFunction()) { | 288 if (function().IsImplicitStaticClosureFunction()) { |
289 // Return a value that represents a closure. Only the type is relevant. | 289 // Return a value that represents an instance. Only the type is relevant. |
290 return &Closure::Handle(); | 290 return &Instance::Handle(); |
291 } | 291 } |
292 return NULL; | 292 return NULL; |
293 } | 293 } |
294 | 294 |
295 | 295 |
296 const char* UnaryOpNode::Name() const { | 296 const char* UnaryOpNode::Name() const { |
297 return Token::Str(kind_); | 297 return Token::Str(kind_); |
298 } | 298 } |
299 | 299 |
300 | 300 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 if (result.IsError() || result.IsNull()) { | 420 if (result.IsError() || result.IsNull()) { |
421 // TODO(turnidge): We could get better error messages by returning | 421 // TODO(turnidge): We could get better error messages by returning |
422 // the Error object directly to the parser. This will involve | 422 // the Error object directly to the parser. This will involve |
423 // replumbing all of the EvalConstExpr methods. | 423 // replumbing all of the EvalConstExpr methods. |
424 return NULL; | 424 return NULL; |
425 } | 425 } |
426 return &Instance::ZoneHandle(Instance::Cast(result).raw()); | 426 return &Instance::ZoneHandle(Instance::Cast(result).raw()); |
427 } | 427 } |
428 | 428 |
429 } // namespace dart | 429 } // namespace dart |
OLD | NEW |