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

Unified Diff: src/compiler/raw-machine-assembler.h

Issue 1164603002: [turbofan] Clean up cctest "framework" for dealing with native calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | test/cctest/compiler/call-tester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/raw-machine-assembler.h
diff --git a/src/compiler/raw-machine-assembler.h b/src/compiler/raw-machine-assembler.h
index b33836802489dcdb7639fb79ccb31063c41845de..8e3871f672c70003276e0e0df7624aa64851e733 100644
--- a/src/compiler/raw-machine-assembler.h
+++ b/src/compiler/raw-machine-assembler.h
@@ -302,15 +302,6 @@ class RawMachineAssembler : public GraphBuilder {
return NewNode(machine()->Uint64Mod(), a, b);
}
- // TODO(turbofan): What is this used for?
- Node* ConvertIntPtrToInt32(Node* a) {
- return kPointerSize == 8 ? NewNode(machine()->TruncateInt64ToInt32(), a)
- : a;
- }
- Node* ConvertInt32ToIntPtr(Node* a) {
- return kPointerSize == 8 ? NewNode(machine()->ChangeInt32ToInt64(), a) : a;
- }
-
#define INTPTR_BINOP(prefix, name) \
Node* IntPtr##name(Node* a, Node* b) { \
return kPointerSize == 8 ? prefix##64##name(a, b) \
@@ -454,6 +445,17 @@ class RawMachineAssembler : public GraphBuilder {
// Parameters.
Node* Parameter(size_t index);
+ // Pointer utilities.
+ Node* LoadFromPointer(void* address, MachineType rep, int32_t offset = 0) {
+ return Load(rep, PointerConstant(address), Int32Constant(offset));
+ }
+ void StoreToPointer(void* address, MachineType rep, Node* node) {
+ Store(rep, PointerConstant(address), node);
+ }
+ Node* StringConstant(const char* string) {
+ return HeapConstant(isolate()->factory()->InternalizeUtf8String(string));
+ }
+
// Control flow.
Label* Exit();
void Goto(Label* label);
« no previous file with comments | « no previous file | test/cctest/compiler/call-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698