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

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

Issue 1362383002: [Interpreter] Add CallRuntime support to the interpreter. (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 9bc634ef94cd538b541186177e19c56c5b30e53e..c67e4c9161f009fd07ffc2c4ea35c50862aedad9 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -456,6 +456,18 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable,
}
+BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime(
+ Runtime::FunctionId function_id, Register first_arg, size_t arg_count) {
+ if (FitsInIdxOperand(function_id) && FitsInIdxOperand(arg_count)) {
+ Output(Bytecode::kCallRuntime, static_cast<uint8_t>(function_id),
+ 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.

Powered by Google App Engine
This is Rietveld 408576698