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

Unified Diff: src/stub-cache.h

Issue 2280007: Extend CallIC to support non-constant names.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 6 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/spaces.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
};
« no previous file with comments | « src/spaces.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698