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

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: Add MIPS port contributed by akos.palfi@imgtec.com 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/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index 613df5368f4b56352c4e4f48152c4ef24126fd3e..f3a1b1ea0803959990370da458ae10da87d8ec54 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -224,6 +224,19 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::Return() {
}
+BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable,
+ Register receiver,
+ size_t arg_count) {
+ if (FitsInByteOperand(arg_count)) {
+ Output(Bytecode::kCall, callable.ToOperand(), receiver.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.
@@ -267,6 +280,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;
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698