Merge V8 5.2.361.47 DO NOT MERGE
https://chromium.googlesource.com/v8/v8/+/5.2.361.47
FPIIM-449
Change-Id: Ibec421b85a9b88cb3a432ada642e469fe7e78346
(cherry picked from commit bcf72ee8e3b26f1d0726869c7ddb3921c68b09a8)
diff --git a/src/interpreter/interpreter.h b/src/interpreter/interpreter.h
index ea50faa..d774d8b 100644
--- a/src/interpreter/interpreter.h
+++ b/src/interpreter/interpreter.h
@@ -21,6 +21,10 @@
class Callable;
class CompilationInfo;
+namespace compiler {
+class Node;
+} // namespace compiler
+
namespace interpreter {
class InterpreterAssembler;
@@ -49,10 +53,16 @@
void TraceCodegen(Handle<Code> code);
const char* LookupNameOfBytecodeHandler(Code* code);
+ Local<v8::Object> GetDispatchCountersObject();
+
Address dispatch_table_address() {
return reinterpret_cast<Address>(&dispatch_table_[0]);
}
+ Address bytecode_dispatch_counters_table() {
+ return reinterpret_cast<Address>(bytecode_dispatch_counters_table_.get());
+ }
+
private:
// Bytecode handler generator functions.
#define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \
@@ -60,16 +70,20 @@
BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR)
#undef DECLARE_BYTECODE_HANDLER_GENERATOR
- // Generates code to perform the binary operations via |callable|.
+ // Generates code to perform the binary operation via |callable|.
void DoBinaryOp(Callable callable, InterpreterAssembler* assembler);
- // Generates code to perform the binary operations via |function_id|.
+ // Generates code to perform the binary operation via |function_id|.
void DoBinaryOp(Runtime::FunctionId function_id,
InterpreterAssembler* assembler);
- // Generates code to perform the count operations via |function_id|.
- void DoCountOp(Runtime::FunctionId function_id,
- InterpreterAssembler* assembler);
+ // Generates code to perform the binary operation via |Generator|.
+ template <class Generator>
+ void DoBinaryOp(InterpreterAssembler* assembler);
+
+ // Generates code to perform the unary operation via |Generator|.
+ template <class Generator>
+ void DoUnaryOp(InterpreterAssembler* assembler);
// Generates code to perform the comparison operation associated with
// |compare_op|.
@@ -114,9 +128,8 @@
// Generates code to perform a type conversion.
void DoTypeConversionOp(Callable callable, InterpreterAssembler* assembler);
- // Generates code ro create a literal via |function_id|.
- void DoCreateLiteral(Runtime::FunctionId function_id,
- InterpreterAssembler* assembler);
+ // Generates code to perform logical-not on boolean |value|.
+ void DoLogicalNotOp(compiler::Node* value, InterpreterAssembler* assembler);
// Generates code to perform delete via function_id.
void DoDelete(Runtime::FunctionId function_id,
@@ -130,6 +143,8 @@
void DoStoreLookupSlot(LanguageMode language_mode,
InterpreterAssembler* assembler);
+ uintptr_t GetDispatchCounter(Bytecode from, Bytecode to) const;
+
// Get dispatch table index of bytecode.
static size_t GetDispatchTableIndex(Bytecode bytecode,
OperandScale operand_scale);
@@ -138,9 +153,11 @@
static const int kNumberOfWideVariants = 3;
static const int kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1);
+ static const int kNumberOfBytecodes = static_cast<int>(Bytecode::kLast) + 1;
Isolate* isolate_;
- Code* dispatch_table_[kDispatchTableSize];
+ Address dispatch_table_[kDispatchTableSize];
+ v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_;
DISALLOW_COPY_AND_ASSIGN(Interpreter);
};