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

Unified Diff: src/compiler/interpreter-assembler.h

Issue 1343363002: [Interpreter] Basic flow control. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Switch test-bytecode-generator/IfConditions to use new style bytecode array check. Created 5 years, 3 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 | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/interpreter-assembler.h
diff --git a/src/compiler/interpreter-assembler.h b/src/compiler/interpreter-assembler.h
index 99cf807a257a969ab82e88511fa3ff68604fb1c0..67ab9cc2a9da4444105ad6aa4f5a6f66be847652 100644
--- a/src/compiler/interpreter-assembler.h
+++ b/src/compiler/interpreter-assembler.h
@@ -13,6 +13,7 @@
#include "src/frames.h"
#include "src/interpreter/bytecodes.h"
#include "src/runtime/runtime.h"
+#include "src/zone-containers.h"
namespace v8 {
namespace internal {
@@ -68,6 +69,7 @@ class InterpreterAssembler {
Node* IntPtrConstant(intptr_t value);
Node* NumberConstant(double value);
Node* HeapConstant(Handle<HeapObject> object);
+ Node* BooleanConstant(bool value);
// Tag and untag Smi values.
Node* SmiTag(Node* value);
@@ -107,6 +109,13 @@ class InterpreterAssembler {
Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1);
Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1, Node* arg2);
+ // Jump relative to the current bytecode by |jump_offset|.
+ void Jump(Node* jump_offset);
+
+ // Jump relative to the current bytecode by |jump_offset| if the
+ // word values |lhs| and |rhs| are equal.
+ void JumpIfWordEqual(Node* lhs, Node* rhs, Node* jump_offset);
+
// Returns from the function.
void Return();
@@ -147,9 +156,13 @@ class InterpreterAssembler {
// Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not
// update BytecodeOffset() itself.
Node* Advance(int delta);
+ Node* Advance(Node* delta);
+
+ // Starts next instruction dispatch at |new_bytecode_offset|.
+ void DispatchTo(Node* new_bytecode_offset);
- // Sets the end node of the graph.
- void SetEndInput(Node* input);
+ // Adds an end node of the graph.
+ void AddEndInput(Node* input);
// Private helpers which delegate to RawMachineAssembler.
Isolate* isolate();
@@ -158,7 +171,7 @@ class InterpreterAssembler {
interpreter::Bytecode bytecode_;
base::SmartPointer<RawMachineAssembler> raw_assembler_;
- Node* end_node_;
+ ZoneVector<Node*> end_nodes_;
Node* accumulator_;
bool code_generated_;
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698