summaryrefslogtreecommitdiff
path: root/deps/v8/src/x64/macro-assembler-x64.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-08-03 10:33:16 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-08-03 10:33:16 -0700
commita6bc68a83beda7609330e525a73b7b227a1b9207 (patch)
tree062a3379d6db01815268a2278c6f5ed8b9f6298e /deps/v8/src/x64/macro-assembler-x64.h
parent4b19bd28967101b7afed3819cf595d4f04a1b11e (diff)
downloadnode-new-a6bc68a83beda7609330e525a73b7b227a1b9207.tar.gz
Upgrade V8 to 2.3.4
Diffstat (limited to 'deps/v8/src/x64/macro-assembler-x64.h')
-rw-r--r--deps/v8/src/x64/macro-assembler-x64.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/deps/v8/src/x64/macro-assembler-x64.h b/deps/v8/src/x64/macro-assembler-x64.h
index 64f35e10de..7a90dd0175 100644
--- a/deps/v8/src/x64/macro-assembler-x64.h
+++ b/deps/v8/src/x64/macro-assembler-x64.h
@@ -163,6 +163,11 @@ class MacroAssembler: public Assembler {
// to the first argument in register rsi.
void EnterExitFrame(ExitFrame::Mode mode, int result_size = 1);
+ void EnterApiExitFrame(ExitFrame::Mode mode,
+ int stack_space,
+ int argc,
+ int result_size = 1);
+
// Leave the current exit frame. Expects/provides the return value in
// register rax:rdx (untouched) and the pointer to the first
// argument in register rsi.
@@ -719,18 +724,36 @@ class MacroAssembler: public Assembler {
// Call a code stub.
void CallStub(CodeStub* stub);
+ // Call a code stub and return the code object called. Try to generate
+ // the code if necessary. Do not perform a GC but instead return a retry
+ // after GC failure.
+ Object* TryCallStub(CodeStub* stub);
+
// Tail call a code stub (jump).
void TailCallStub(CodeStub* stub);
+ // Tail call a code stub (jump) and return the code object called. Try to
+ // generate the code if necessary. Do not perform a GC but instead return
+ // a retry after GC failure.
+ Object* TryTailCallStub(CodeStub* stub);
+
// Return from a code stub after popping its arguments.
void StubReturn(int argc);
// Call a runtime routine.
void CallRuntime(Runtime::Function* f, int num_arguments);
+ // Call a runtime function, returning the CodeStub object called.
+ // Try to generate the stub code if necessary. Do not perform a GC
+ // but instead return a retry after GC failure.
+ Object* TryCallRuntime(Runtime::Function* f, int num_arguments);
+
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId id, int num_arguments);
+ // Convenience function: Same as above, but takes the fid instead.
+ Object* TryCallRuntime(Runtime::FunctionId id, int num_arguments);
+
// Convenience function: call an external reference.
void CallExternalReference(const ExternalReference& ext,
int num_arguments);
@@ -747,6 +770,16 @@ class MacroAssembler: public Assembler {
int num_arguments,
int result_size);
+ void PushHandleScope(Register scratch);
+
+ // Pops a handle scope using the specified scratch register and
+ // ensuring that saved register is left unchanged.
+ void PopHandleScope(Register saved, Register scratch);
+
+ // As PopHandleScope, but does not perform a GC. Instead, returns a
+ // retry after GC failure object if GC is necessary.
+ Object* TryPopHandleScope(Register saved, Register scratch);
+
// Jump to a runtime routine.
void JumpToExternalReference(const ExternalReference& ext, int result_size);
@@ -835,6 +868,9 @@ class MacroAssembler: public Assembler {
void EnterFrame(StackFrame::Type type);
void LeaveFrame(StackFrame::Type type);
+ void EnterExitFramePrologue(ExitFrame::Mode mode, bool save_rax);
+ void EnterExitFrameEpilogue(ExitFrame::Mode mode, int result_size, int argc);
+
// Allocation support helpers.
// Loads the top of new-space into the result register.
// If flags contains RESULT_CONTAINS_TOP then result_end is valid and
@@ -848,6 +884,13 @@ class MacroAssembler: public Assembler {
// Update allocation top with value in result_end register.
// If scratch is valid, it contains the address of the allocation top.
void UpdateAllocationTopHelper(Register result_end, Register scratch);
+
+ // Helper for PopHandleScope. Allowed to perform a GC and returns
+ // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and
+ // possibly returns a failure object indicating an allocation failure.
+ Object* PopHandleScopeHelper(Register saved,
+ Register scratch,
+ bool gc_allowed);
};