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

Unified Diff: src/compiler/code-generator-impl.h

Issue 1205023002: [turbofan] Add basic support for calling to (a subset of) C functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix argument slots. Created 5 years, 6 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/compiler/code-generator-impl.h
diff --git a/src/compiler/code-generator-impl.h b/src/compiler/code-generator-impl.h
index 1cab854ce8f2759d194c9bfa584db6520075536e..f0762e9bbec2e0657c6e8372e643c0eed4db47d0 100644
--- a/src/compiler/code-generator-impl.h
+++ b/src/compiler/code-generator-impl.h
@@ -57,6 +57,10 @@ class InstructionOperandConverter {
return static_cast<uint8_t>(InputInt32(index) & 0x3F);
}
+ ExternalReference InputExternalReference(size_t index) {
+ return ToExternalReference(instr_->InputAt(index));
+ }
+
Handle<HeapObject> InputHeapObject(size_t index) {
return ToHeapObject(instr_->InputAt(index));
}
@@ -108,6 +112,10 @@ class InstructionOperandConverter {
double ToDouble(InstructionOperand* op) { return ToConstant(op).ToFloat64(); }
+ ExternalReference ToExternalReference(InstructionOperand* op) {
+ return ToConstant(op).ToExternalReference();
+ }
+
Handle<HeapObject> ToHeapObject(InstructionOperand* op) {
return ToConstant(op).ToHeapObject();
}

Powered by Google App Engine
This is Rietveld 408576698