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

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

Issue 1379933003: Revert of [Interpreter] Add CallRuntime support to the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-array-iterator.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 6b046d35eb4abd7cc4cbb749272028af10925a13..9c937d74370d3cde35fcb47caa36239d048b6137 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -161,7 +161,7 @@
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadLiteral(Handle<Object> object) {
size_t entry = GetConstantPoolEntry(object);
- if (FitsInIdx8Operand(entry)) {
+ if (FitsInIdxOperand(entry)) {
Output(Bytecode::kLdaConstant, static_cast<uint8_t>(entry));
} else {
UNIMPLEMENTED();
@@ -216,7 +216,7 @@
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadGlobal(int slot_index) {
DCHECK(slot_index >= 0);
- if (FitsInIdx8Operand(slot_index)) {
+ if (FitsInIdxOperand(slot_index)) {
Output(Bytecode::kLdaGlobal, static_cast<uint8_t>(slot_index));
} else {
UNIMPLEMENTED();
@@ -230,7 +230,7 @@
UNIMPLEMENTED();
}
- if (FitsInIdx8Operand(feedback_slot)) {
+ if (FitsInIdxOperand(feedback_slot)) {
Output(Bytecode::kLoadIC, object.ToOperand(),
static_cast<uint8_t>(feedback_slot));
} else {
@@ -246,7 +246,7 @@
UNIMPLEMENTED();
}
- if (FitsInIdx8Operand(feedback_slot)) {
+ if (FitsInIdxOperand(feedback_slot)) {
Output(Bytecode::kKeyedLoadIC, object.ToOperand(),
static_cast<uint8_t>(feedback_slot));
} else {
@@ -263,7 +263,7 @@
UNIMPLEMENTED();
}
- if (FitsInIdx8Operand(feedback_slot)) {
+ if (FitsInIdxOperand(feedback_slot)) {
Output(Bytecode::kStoreIC, object.ToOperand(), name.ToOperand(),
static_cast<uint8_t>(feedback_slot));
} else {
@@ -280,7 +280,7 @@
UNIMPLEMENTED();
}
- if (FitsInIdx8Operand(feedback_slot)) {
+ if (FitsInIdxOperand(feedback_slot)) {
Output(Bytecode::kKeyedStoreIC, object.ToOperand(), key.ToOperand(),
static_cast<uint8_t>(feedback_slot));
} else {
@@ -376,7 +376,7 @@
} else {
// Update the jump type and operand
size_t entry = GetConstantPoolEntry(handle(Smi::FromInt(delta), isolate()));
- if (FitsInIdx8Operand(entry)) {
+ if (FitsInIdxOperand(entry)) {
jump_bytecode = GetJumpWithConstantOperand(jump_bytecode);
*jump_location++ = Bytecodes::ToByte(jump_bytecode);
*jump_location = static_cast<uint8_t>(entry);
@@ -414,7 +414,7 @@
Output(jump_bytecode, static_cast<uint8_t>(delta));
} else {
size_t entry = GetConstantPoolEntry(handle(Smi::FromInt(delta), isolate()));
- if (FitsInIdx8Operand(entry)) {
+ if (FitsInIdxOperand(entry)) {
Output(GetJumpWithConstantOperand(jump_bytecode),
static_cast<uint8_t>(entry));
} else {
@@ -467,22 +467,12 @@
BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable,
Register receiver,
size_t arg_count) {
- if (FitsInIdx8Operand(arg_count)) {
+ if (FitsInIdxOperand(arg_count)) {
Output(Bytecode::kCall, callable.ToOperand(), receiver.ToOperand(),
static_cast<uint8_t>(arg_count));
} else {
UNIMPLEMENTED();
}
- return *this;
-}
-
-
-BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime(
- Runtime::FunctionId function_id, Register first_arg, size_t arg_count) {
- DCHECK(FitsInIdx16Operand(function_id));
- DCHECK(FitsInIdx8Operand(arg_count));
- Output(Bytecode::kCallRuntime, static_cast<uint16_t>(function_id),
- first_arg.ToOperand(), static_cast<uint8_t>(arg_count));
return *this;
}
@@ -607,13 +597,13 @@
// static
-bool BytecodeArrayBuilder::FitsInIdx8Operand(int value) {
+bool BytecodeArrayBuilder::FitsInIdxOperand(int value) {
return kMinUInt8 <= value && value <= kMaxUInt8;
}
// static
-bool BytecodeArrayBuilder::FitsInIdx8Operand(size_t value) {
+bool BytecodeArrayBuilder::FitsInIdxOperand(size_t value) {
return value <= static_cast<size_t>(kMaxUInt8);
}
@@ -621,12 +611,6 @@
// static
bool BytecodeArrayBuilder::FitsInImm8Operand(int value) {
return kMinInt8 <= value && value < kMaxInt8;
-}
-
-
-// static
-bool BytecodeArrayBuilder::FitsInIdx16Operand(int value) {
- return kMinUInt16 <= value && value <= kMaxUInt16;
}
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-array-iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698