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

Unified Diff: src/fast-codegen.h

Issue 339082: Initial implementation of top-level compilation of expressions in test... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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
Index: src/fast-codegen.h
===================================================================
--- src/fast-codegen.h (revision 3181)
+++ src/fast-codegen.h (working copy)
@@ -39,7 +39,12 @@
class FastCodeGenerator: public AstVisitor {
public:
FastCodeGenerator(MacroAssembler* masm, Handle<Script> script, bool is_eval)
- : masm_(masm), function_(NULL), script_(script), is_eval_(is_eval) {
+ : masm_(masm),
+ function_(NULL),
+ script_(script),
+ is_eval_(is_eval),
+ true_label_(NULL),
+ false_label_(NULL) {
}
static Handle<Code> MakeCode(FunctionLiteral* fun,
@@ -59,6 +64,10 @@
// If destination is TOS, just overwrite TOS with source.
void DropAndMove(Expression::Context destination, Register source);
+ // Test the JavaScript value in source as if in a test context, compile
+ // control flow to a pair of labels.
+ void TestAndBranch(Register source, Label* true_label, Label* false_label);
+
void VisitDeclarations(ZoneList<Declaration*>* declarations);
Handle<JSFunction> BuildBoilerplate(FunctionLiteral* fun);
void DeclareGlobals(Handle<FixedArray> pairs);
@@ -81,6 +90,9 @@
Handle<Script> script_;
bool is_eval_;
+ Label* true_label_;
+ Label* false_label_;
+
DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator);
};

Powered by Google App Engine
This is Rietveld 408576698