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

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 1323463005: [Interpreter] Add support for JS calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index dba816d61810d63259412f946f219494c2e134ef..ff3b4883554d114035d6b8f33a2601358cea3f06 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -182,6 +182,18 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::Return() {
}
+BytecodeArrayBuilder& BytecodeArrayBuilder::CallJS(Register first_arg,
+ size_t arg_count) {
+ if (FitsInByteOperand(arg_count)) {
+ Output(Bytecode::kCallJS, first_arg.ToOperand(),
+ static_cast<uint8_t>(arg_count));
+ } else {
+ UNIMPLEMENTED();
+ }
+ return *this;
+}
+
+
size_t BytecodeArrayBuilder::GetConstantPoolEntry(Handle<Object> object) {
// These constants shouldn't be added to the constant pool, the should use
// specialzed bytecodes instead.
@@ -225,6 +237,7 @@ bool BytecodeArrayBuilder::OperandIsValid(Bytecode bytecode, int operand_index,
switch (operand_type) {
case OperandType::kNone:
return false;
+ case OperandType::kCount:
case OperandType::kImm8:
case OperandType::kIdx:
return true;

Powered by Google App Engine
This is Rietveld 408576698