Index: src/stub-cache.cc |
diff --git a/src/stub-cache.cc b/src/stub-cache.cc |
index f3532533e7e01ac09996b96543dd10e40969d45d..6ebe495f16830b276ba0a115a1d1efe69a5ee018 100644 |
--- a/src/stub-cache.cc |
+++ b/src/stub-cache.cc |
@@ -1142,6 +1142,29 @@ Object* KeyedStoreStubCompiler::GetCode(PropertyType type, String* name) { |
} |
+Object* CallStubCompiler::CompileCustomCall(int generator_id, |
+ Object* object, |
+ JSObject* holder, |
+ JSFunction* function, |
+ String* fname, |
+ CheckType check) { |
+ ASSERT(generator_id >= 0 && generator_id < kNumCallGenerators); |
+ switch (generator_id) { |
+#define CALL_GENERATOR_CASE(ignored1, ignored2, name) \ |
+ case k##name##CallGenerator: \ |
+ return CallStubCompiler::Compile##name##Call(object, \ |
+ holder, \ |
+ function, \ |
+ fname, \ |
+ check); |
+ CUSTOM_CALL_IC_GENERATORS(CALL_GENERATOR_CASE) |
+#undef CALL_GENERATOR_CASE |
+ } |
+ UNREACHABLE(); |
+ return Heap::undefined_value(); |
+} |
+ |
+ |
Object* CallStubCompiler::GetCode(PropertyType type, String* name) { |
int argc = arguments_.immediate(); |
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::CALL_IC, |
@@ -1152,6 +1175,15 @@ Object* CallStubCompiler::GetCode(PropertyType type, String* name) { |
} |
+Object* CallStubCompiler::GetCode(JSFunction* function) { |
+ String* function_name = NULL; |
+ if (function->shared()->name()->IsString()) { |
+ function_name = String::cast(function->shared()->name()); |
+ } |
+ return GetCode(CONSTANT_FUNCTION, function_name); |
+} |
+ |
+ |
Object* ConstructStubCompiler::GetCode() { |
Code::Flags flags = Code::ComputeFlags(Code::STUB); |
Object* result = GetCodeWithFlags(flags, "ConstructStub"); |