Index: src/compiler/code-stub-assembler.h |
diff --git a/src/compiler/code-stub-assembler.h b/src/compiler/code-stub-assembler.h |
index b6b2bd4738419e6100366c8c1a18ceea18809bb6..5c89d82763addb7907cb8513007aea16cb206dee 100644 |
--- a/src/compiler/code-stub-assembler.h |
+++ b/src/compiler/code-stub-assembler.h |
@@ -69,12 +69,18 @@ class Schedule; |
class CodeStubAssembler { |
public: |
+ // CodeStubAssembler for generating stubs. |
// |result_size| specifies the number of results returned by the stub. |
// TODO(rmcilroy): move result_size to the CallInterfaceDescriptor. |
CodeStubAssembler(Isolate* isolate, Zone* zone, |
const CallInterfaceDescriptor& descriptor, |
Code::Flags flags, const char* name, |
size_t result_size = 1); |
+ |
+ // CodeStubAssembler for generating JS functions. |
+ CodeStubAssembler(Isolate* isolate, Zone* zone, int parameter_count, |
+ Code::Flags flags, const char* name); |
+ |
virtual ~CodeStubAssembler(); |
Handle<Code> GenerateCode(); |
@@ -105,6 +111,8 @@ class CodeStubAssembler { |
Node* HeapConstant(Handle<HeapObject> object); |
Node* BooleanConstant(bool value); |
Node* ExternalConstant(ExternalReference address); |
+ Node* NullConstant(); |
+ Node* UndefinedConstant(); |
Node* Parameter(int value); |
void Return(Node* value); |
@@ -186,6 +194,10 @@ class CodeStubAssembler { |
Node* TailCall(const CallInterfaceDescriptor& descriptor, Node* target, |
Node** args, size_t result_size = 1); |
+ // Calls w/ custom CallDescriptor. Prefer the call methods above. |
+ Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args); |
danno
2016/02/18 15:01:15
Nit: The TailCallStub call doesn't append the "N"
|
+ Node* TailCallN(CallDescriptor* descriptor, Node* code_target, Node** args); |
+ |
// =========================================================================== |
// Macros |
// =========================================================================== |
@@ -205,6 +217,11 @@ class CodeStubAssembler { |
// Load a field from an object on the heap. |
Node* LoadObjectField(Node* object, int offset); |
+ // Load a machine-typed value from an object on the heap, or from a native |
+ // (C++) object. |
+ Node* LoadObjectFieldTyped(Node* object, int offset, MachineType rep); |
danno
2016/02/18 15:01:15
Any reason to not combine these with the LoadObjec
|
+ Node* LoadNativeFieldTyped(Node* object, int offset, MachineType rep); |
+ |
// Load an array element from a FixedArray. |
Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index, |
int additional_offset = 0); |
@@ -223,9 +240,9 @@ class CodeStubAssembler { |
private: |
friend class CodeStubAssemblerTester; |
- Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args); |
- Node* TailCallN(CallDescriptor* descriptor, Node* code_target, Node** args); |
- |
+ CodeStubAssembler(Isolate* isolate, Zone* zone, |
+ CallDescriptor* call_descriptor, Code::Flags flags, |
+ const char* name); |
Node* SmiShiftBitsConstant(); |
base::SmartPointer<RawMachineAssembler> raw_assembler_; |