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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 | 422 |
423 const Instance* StaticGetterNode::EvalConstExpr() const { | 423 const Instance* StaticGetterNode::EvalConstExpr() const { |
424 const String& getter_name = | 424 const String& getter_name = |
425 String::Handle(Field::GetterName(this->field_name())); | 425 String::Handle(Field::GetterName(this->field_name())); |
426 const Function& getter_func = | 426 const Function& getter_func = |
427 Function::Handle(this->cls().LookupStaticFunction(getter_name)); | 427 Function::Handle(this->cls().LookupStaticFunction(getter_name)); |
428 if (getter_func.IsNull() || !getter_func.is_const()) { | 428 if (getter_func.IsNull() || !getter_func.is_const()) { |
429 return NULL; | 429 return NULL; |
430 } | 430 } |
431 const Object& result = Object::Handle( | 431 const Object& result = Object::Handle( |
432 DartEntry::InvokeStatic(getter_func, Object::empty_array())); | 432 DartEntry::InvokeFunction(getter_func, Object::empty_array())); |
433 if (result.IsError() || result.IsNull()) { | 433 if (result.IsError() || result.IsNull()) { |
434 // TODO(turnidge): We could get better error messages by returning | 434 // TODO(turnidge): We could get better error messages by returning |
435 // the Error object directly to the parser. This will involve | 435 // the Error object directly to the parser. This will involve |
436 // replumbing all of the EvalConstExpr methods. | 436 // replumbing all of the EvalConstExpr methods. |
437 return NULL; | 437 return NULL; |
438 } | 438 } |
439 return &Instance::ZoneHandle(Instance::Cast(result).raw()); | 439 return &Instance::ZoneHandle(Instance::Cast(result).raw()); |
440 } | 440 } |
441 | 441 |
442 } // namespace dart | 442 } // namespace dart |
OLD | NEW |