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

Unified Diff: src/ia32/macro-assembler-ia32.h

Issue 3792003: Optimizing HandleScope. Also fixed HandleScope destruction when API getter th... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 2 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 | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.h
===================================================================
--- src/ia32/macro-assembler-ia32.h (revision 5685)
+++ src/ia32/macro-assembler-ia32.h (working copy)
@@ -480,16 +480,17 @@
void CallCFunction(ExternalReference function, int num_arguments);
void CallCFunction(Register function, int num_arguments);
- void PushHandleScope(Register scratch);
+ // Prepares stack to put arguments (aligns and so on). Reserves
+ // space for return value if needed (assumes the return value is a handle).
+ // Uses callee-saved esi to restore stack state after call. Arguments must be
+ // stored in ApiParameterOperand(0), ApiParameterOperand(1) etc.
+ void PrepareCallApiFunction(int stack_space, int argc);
- // Pops a handle scope using the specified scratch register and
- // ensuring that saved register is left unchanged.
- void PopHandleScope(Register saved, Register scratch);
+ // Tail call an API function (jump). Allocates HandleScope, extracts
+ // returned value from handle and propagates exceptions.
+ // Clobbers ebx, esi, edi and caller-save registers.
+ void CallApiFunctionAndReturn(ApiFunction* function, int argc);
- // 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);
@@ -639,7 +640,10 @@
return Operand(object, index, scale, offset - kHeapObjectTag);
}
+// Generates an Operand for saving parameters after PrepareCallApiFunction.
+Operand ApiParameterOperand(int index);
+
#ifdef GENERATED_CODE_COVERAGE
extern void LogGeneratedCodeCoverage(const char* file_line);
#define CODE_COVERAGE_STRINGIFY(x) #x
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698