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

Side by Side Diff: runtime/vm/ast.cc

Issue 12315087: Hook up simulator (if needed) when calling Dart code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698