Index: runtime/vm/compiler.h |
=================================================================== |
--- runtime/vm/compiler.h (revision 3862) |
+++ runtime/vm/compiler.h (working copy) |
@@ -25,21 +25,32 @@ |
public: |
// Extracts class, interface, function symbols from the script and populates |
// the symbol tables and the class dictionary of the library. |
- static void Compile(const Library& library, const Script& script); |
+ // |
+ // Returns Error::null() if there is no compilation error. |
+ static RawError* Compile(const Library& library, const Script& script); |
// Generates code for given function and sets its code field. |
- static void CompileFunction(const Function& function); |
+ // |
+ // Returns Error::null() if there is no compilation error. |
+ static RawError* CompileFunction(const Function& function); |
// Generates optimized code for function. |
- static void CompileOptimizedFunction(const Function& function); |
+ // |
+ // Returns Error::null() if there is no compilation error. |
+ static RawError* CompileOptimizedFunction(const Function& function); |
// Generates and executes code for a given code fragment, e.g. a |
// compile time constant expression. Returns the result returned |
// by the fragment. |
- static RawInstance* ExecuteOnce(SequenceNode* fragment); |
+ // |
+ // The return value is either a RawInstance on success or a RawError |
+ // on compilation failure. |
+ static RawObject* ExecuteOnce(SequenceNode* fragment); |
// Eagerly compiles all functions in a class. |
- static void CompileAllFunctions(const Class& cls); |
+ // |
+ // Returns Error::null() if there is no compilation error. |
+ static RawError* CompileAllFunctions(const Class& cls); |
}; |
} // namespace dart |