Upgrade V8 to version 4.9.385.28
https://chromium.googlesource.com/v8/v8/+/4.9.385.28
FPIIM-449
Change-Id: I4b2e74289d4bf3667f2f3dc8aa2e541f63e26eb4
diff --git a/src/compiler/code-generator-impl.h b/src/compiler/code-generator-impl.h
index 7942344..7295948 100644
--- a/src/compiler/code-generator-impl.h
+++ b/src/compiler/code-generator-impl.h
@@ -27,49 +27,63 @@
// -- Instruction operand accesses with conversions --------------------------
- Register InputRegister(int index) {
+ Register InputRegister(size_t index) {
return ToRegister(instr_->InputAt(index));
}
- DoubleRegister InputDoubleRegister(int index) {
+ DoubleRegister InputDoubleRegister(size_t index) {
return ToDoubleRegister(instr_->InputAt(index));
}
- double InputDouble(int index) { return ToDouble(instr_->InputAt(index)); }
+ double InputDouble(size_t index) { return ToDouble(instr_->InputAt(index)); }
- int32_t InputInt32(int index) {
+ float InputFloat32(size_t index) { return ToFloat32(instr_->InputAt(index)); }
+
+ int32_t InputInt32(size_t index) {
return ToConstant(instr_->InputAt(index)).ToInt32();
}
- int8_t InputInt8(int index) { return static_cast<int8_t>(InputInt32(index)); }
+ int64_t InputInt64(size_t index) {
+ return ToConstant(instr_->InputAt(index)).ToInt64();
+ }
- int16_t InputInt16(int index) {
+ int8_t InputInt8(size_t index) {
+ return static_cast<int8_t>(InputInt32(index));
+ }
+
+ int16_t InputInt16(size_t index) {
return static_cast<int16_t>(InputInt32(index));
}
- uint8_t InputInt5(int index) {
+ uint8_t InputInt5(size_t index) {
return static_cast<uint8_t>(InputInt32(index) & 0x1F);
}
- uint8_t InputInt6(int index) {
+ uint8_t InputInt6(size_t index) {
return static_cast<uint8_t>(InputInt32(index) & 0x3F);
}
- Handle<HeapObject> InputHeapObject(int index) {
+ ExternalReference InputExternalReference(size_t index) {
+ return ToExternalReference(instr_->InputAt(index));
+ }
+
+ Handle<HeapObject> InputHeapObject(size_t index) {
return ToHeapObject(instr_->InputAt(index));
}
- Label* InputLabel(int index) { return ToLabel(instr_->InputAt(index)); }
+ Label* InputLabel(size_t index) { return ToLabel(instr_->InputAt(index)); }
- BasicBlock::RpoNumber InputRpo(int index) {
+ RpoNumber InputRpo(size_t index) {
return ToRpoNumber(instr_->InputAt(index));
}
- Register OutputRegister(int index = 0) {
+ Register OutputRegister(size_t index = 0) {
return ToRegister(instr_->OutputAt(index));
}
- Register TempRegister(int index) { return ToRegister(instr_->TempAt(index)); }
+ Register TempRegister(size_t index) {
+ return ToRegister(instr_->TempAt(index));
+ }
DoubleRegister OutputDoubleRegister() {
return ToDoubleRegister(instr_->Output());
@@ -81,34 +95,42 @@
return gen_->GetLabel(ToRpoNumber(op));
}
- BasicBlock::RpoNumber ToRpoNumber(InstructionOperand* op) {
+ RpoNumber ToRpoNumber(InstructionOperand* op) {
return ToConstant(op).ToRpoNumber();
}
Register ToRegister(InstructionOperand* op) {
- DCHECK(op->IsRegister());
- return Register::FromAllocationIndex(op->index());
+ return LocationOperand::cast(op)->GetRegister();
}
DoubleRegister ToDoubleRegister(InstructionOperand* op) {
- DCHECK(op->IsDoubleRegister());
- return DoubleRegister::FromAllocationIndex(op->index());
+ return LocationOperand::cast(op)->GetDoubleRegister();
}
Constant ToConstant(InstructionOperand* op) {
if (op->IsImmediate()) {
- return gen_->code()->GetImmediate(op->index());
+ return gen_->code()->GetImmediate(ImmediateOperand::cast(op));
}
- return gen_->code()->GetConstant(op->index());
+ return gen_->code()->GetConstant(
+ ConstantOperand::cast(op)->virtual_register());
}
double ToDouble(InstructionOperand* op) { return ToConstant(op).ToFloat64(); }
+ float ToFloat32(InstructionOperand* op) { return ToConstant(op).ToFloat32(); }
+
+ ExternalReference ToExternalReference(InstructionOperand* op) {
+ return ToConstant(op).ToExternalReference();
+ }
+
Handle<HeapObject> ToHeapObject(InstructionOperand* op) {
return ToConstant(op).ToHeapObject();
}
Frame* frame() const { return gen_->frame(); }
+ FrameAccessState* frame_access_state() const {
+ return gen_->frame_access_state();
+ }
Isolate* isolate() const { return gen_->isolate(); }
Linkage* linkage() const { return gen_->linkage(); }
@@ -128,12 +150,15 @@
Label* entry() { return &entry_; }
Label* exit() { return &exit_; }
+ Frame* frame() const { return frame_; }
+ Isolate* isolate() const { return masm()->isolate(); }
MacroAssembler* masm() const { return masm_; }
OutOfLineCode* next() const { return next_; }
private:
Label entry_;
Label exit_;
+ Frame* const frame_;
MacroAssembler* const masm_;
OutOfLineCode* const next_;
};
@@ -144,6 +169,8 @@
static inline void FinishCode(MacroAssembler* masm) {
#if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM
masm->CheckConstPool(true, false);
+#elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64
+ masm->ud2();
#endif
}