Index: runtime/vm/ast.cc |
=================================================================== |
--- runtime/vm/ast.cc (revision 3415) |
+++ runtime/vm/ast.cc (working copy) |
@@ -438,15 +438,21 @@ |
} |
GrowableArray<const Object*> arguments; |
const Array& kNoArgumentNames = Array::Handle(); |
- const Instance& field_value = |
- Instance::ZoneHandle(DartEntry::InvokeStatic(getter_func, |
+ const Object& result = |
+ Object::ZoneHandle(DartEntry::InvokeStatic(getter_func, |
arguments, |
kNoArgumentNames)); |
siva
2012/01/31 00:52:34
Does result have to be a ZoneHandle? We are not re
turnidge
2012/01/31 21:56:31
Done.
|
- if (field_value.IsUnhandledException()) { |
+ if (result.IsError()) { |
+ // TODO(turnidge): We could get better error messages by returning |
+ // the Error object directly to the parser. This will involve |
+ // replumbing all of the EvalConstExpr methods. |
return NULL; |
} |
- if (!field_value.IsNull()) { |
- return &field_value; |
+ ASSERT(result.IsInstance()); |
siva
2012/01/31 00:52:34
Why is this assert needed here doesn't the ^= assi
turnidge
2012/01/31 21:56:31
Removed.
|
+ Instance& value = Instance::ZoneHandle(); |
siva
2012/01/31 00:52:34
why not call it field_value instead of value to re
turnidge
2012/01/31 21:56:31
Done.
|
+ value ^= result.raw(); |
+ if (!value.IsNull()) { |
siva
2012/01/31 00:52:34
The NULL check can be done before we create an Ins
turnidge
2012/01/31 21:56:31
Done.
|
+ return &value; |
} |
return NULL; |
} |