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

Unified Diff: runtime/vm/dart_entry.h

Issue 9314053: Revert Dart_PropagateError until I can track down the problems in (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/dart_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_entry.h
===================================================================
--- runtime/vm/dart_entry.h (revision 3821)
+++ runtime/vm/dart_entry.h (working copy)
@@ -19,37 +19,42 @@
class Integer;
class Object;
class RawInstance;
-class RawObject;
class String;
// DartEntry abstracts functionality needed to resolve dart functions
// and invoke them from C++.
+//
+// TODO(turnidge): Make these functions assert that there is an active
+// setjmp. Or make these functions do the setjmps themselves and
+// represent compile errors with an explict object type.
+//
+// TODO(turnidge): Make these functions return RawObject instead of
+// RawInstance.
class DartEntry : public AllStatic {
public:
- // On success, returns a RawInstance. On failure, a RawError.
- typedef RawObject* (*invokestub)(uword entry_point,
- const Array& arguments_descriptor,
- const Object** arguments,
- const Context& context);
+ typedef RawInstance* (*invokestub)(uword entry_point,
+ const Array& arguments_descriptor,
+ const Object** arguments,
+ const Context& context);
- // Invokes the specified instance function on the receiver.
- // On success, returns a RawInstance. On failure, a RawError.
- static RawObject* InvokeDynamic(
+ // Invoke the specified instance function on the receiver.
+ // Returns object returned by the dart instance function.
+ static RawInstance* InvokeDynamic(
const Instance& receiver,
const Function& function,
const GrowableArray<const Object*>& arguments,
const Array& optional_arguments_names);
// Invoke the specified static function.
- // On success, returns a RawInstance. On failure, a RawError.
- static RawObject* InvokeStatic(
+ // Returns object returned by the dart static function.
+ static RawInstance* InvokeStatic(
const Function& function,
const GrowableArray<const Object*>& arguments,
const Array& optional_arguments_names);
// Invoke the specified closure object.
- // On success, returns a RawInstance. On failure, a RawError.
- static RawObject* InvokeClosure(
+ // Returns object returned by the closure.
+ static RawInstance* InvokeClosure(
const Closure& closure,
const GrowableArray<const Object*>& arguments,
const Array& optional_arguments_names);
@@ -60,18 +65,13 @@
// Each may return an exception object.
class DartLibraryCalls : public AllStatic {
public:
- // On success, returns a RawInstance. On failure, a RawError.
- static RawObject* ExceptionCreate(
+ static RawInstance* ExceptionCreate(
const String& exception_name,
const GrowableArray<const Object*>& arguments);
+ static RawInstance* ToString(const Instance& receiver);
+ static RawInstance* Equals(const Instance& left, const Instance& right);
- // On success, returns a RawInstance. On failure, a RawError.
- static RawObject* ToString(const Instance& receiver);
-
- // On success, returns a RawInstance. On failure, a RawError.
- static RawObject* Equals(const Instance& left, const Instance& right);
-
- // Returns null on success, a RawError on failure.
+ // Returns either an unhandled exception or null.
static RawObject* HandleMessage(Dart_Port dest_port_id,
Dart_Port reply_port_id,
const Instance& dart_message);
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/dart_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698