Index: src/stub-cache.h |
=================================================================== |
--- src/stub-cache.h (revision 4791) |
+++ src/stub-cache.h (working copy) |
@@ -142,6 +142,7 @@ |
static Object* ComputeCallField(int argc, |
InLoopFlag in_loop, |
+ Code::Kind, |
String* name, |
Object* object, |
JSObject* holder, |
@@ -149,6 +150,7 @@ |
static Object* ComputeCallConstant(int argc, |
InLoopFlag in_loop, |
+ Code::Kind, |
String* name, |
Object* object, |
JSObject* holder, |
@@ -156,16 +158,19 @@ |
static Object* ComputeCallNormal(int argc, |
InLoopFlag in_loop, |
+ Code::Kind, |
String* name, |
JSObject* receiver); |
static Object* ComputeCallInterceptor(int argc, |
+ Code::Kind, |
String* name, |
Object* object, |
JSObject* holder); |
static Object* ComputeCallGlobal(int argc, |
InLoopFlag in_loop, |
+ Code::Kind, |
String* name, |
JSObject* receiver, |
GlobalObject* holder, |
@@ -174,18 +179,33 @@ |
// --- |
- static Object* ComputeCallInitialize(int argc, InLoopFlag in_loop); |
- static Object* ComputeCallPreMonomorphic(int argc, InLoopFlag in_loop); |
- static Object* ComputeCallNormal(int argc, InLoopFlag in_loop); |
- static Object* ComputeCallMegamorphic(int argc, InLoopFlag in_loop); |
- static Object* ComputeCallMiss(int argc); |
+ static Object* ComputeCallInitialize(int argc, |
+ InLoopFlag in_loop, |
+ Code::Kind kind); |
+ static Object* ComputeCallPreMonomorphic(int argc, |
+ InLoopFlag in_loop, |
+ Code::Kind kind); |
+ |
+ static Object* ComputeCallNormal(int argc, |
+ InLoopFlag in_loop, |
+ Code::Kind kind); |
+ |
+ static Object* ComputeCallMegamorphic(int argc, |
+ InLoopFlag in_loop, |
+ Code::Kind kind); |
+ |
+ static Object* ComputeCallMiss(int argc, Code::Kind kind); |
+ |
// Finds the Code object stored in the Heap::non_monomorphic_cache(). |
- static Code* FindCallInitialize(int argc, InLoopFlag in_loop); |
+ static Code* FindCallInitialize(int argc, |
+ InLoopFlag in_loop, |
+ Code::Kind kind); |
#ifdef ENABLE_DEBUGGER_SUPPORT |
- static Object* ComputeCallDebugBreak(int argc); |
- static Object* ComputeCallDebugPrepareStepIn(int argc); |
+ static Object* ComputeCallDebugBreak(int argc, Code::Kind kind); |
+ |
+ static Object* ComputeCallDebugPrepareStepIn(int argc, Code::Kind kind); |
#endif |
static Object* ComputeLazyCompile(int argc); |
@@ -197,9 +217,6 @@ |
// Clear the lookup table (@ mark compact collection). |
static void Clear(); |
- // Functions for generating stubs at startup. |
- static void GenerateMiss(MacroAssembler* masm); |
- |
// Generate code for probing the stub cache table. |
// If extra != no_reg it might be used as am extra scratch register. |
static void GenerateProbe(MacroAssembler* masm, |
@@ -318,7 +335,7 @@ |
// Support function for computing call IC miss stubs. |
-Handle<Code> ComputeCallMiss(int argc); |
+Handle<Code> ComputeCallMiss(int argc, Code::Kind kind); |
// The stub compiler compiles stubs for the stub cache. |
@@ -585,8 +602,8 @@ |
kNumCallGenerators |
}; |
- CallStubCompiler(int argc, InLoopFlag in_loop) |
- : arguments_(argc), in_loop_(in_loop) { } |
+ CallStubCompiler(int argc, InLoopFlag in_loop, Code::Kind kind) |
+ : arguments_(argc), in_loop_(in_loop), kind_(kind) { } |
Object* CompileCallField(JSObject* object, |
JSObject* holder, |
@@ -626,6 +643,7 @@ |
private: |
const ParameterCount arguments_; |
const InLoopFlag in_loop_; |
+ const Code::Kind kind_; |
const ParameterCount& arguments() { return arguments_; } |
@@ -634,6 +652,10 @@ |
// Convenience function. Calls GetCode above passing |
// CONSTANT_FUNCTION type and the name of the given function. |
Object* GetCode(JSFunction* function); |
+ |
+ void GenerateNameCheck(String* name, Label* miss); |
+ |
+ void GenerateMissBranch(); |
}; |