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

Unified Diff: src/codegen.cc

Issue 573056: Add fuzzing support for inline runtime functions (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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/codegen.h ('k') | src/ia32/codegen-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.cc
===================================================================
--- src/codegen.cc (revision 4085)
+++ src/codegen.cc (working copy)
@@ -351,42 +351,18 @@
}
+// List of special runtime calls which are generated inline. For some of these
+// functions the code will be generated inline, and for others a call to a code
+// stub will be inlined.
-// Special cases: These 'runtime calls' manipulate the current
-// frame and are only used 1 or two places, so we generate them
-// inline instead of generating calls to them. They are used
-// for implementing Function.prototype.call() and
-// Function.prototype.apply().
+#define INLINE_RUNTIME_ENTRY(Name, argc, ressize) \
+ {&CodeGenerator::Generate##Name, "_" #Name, argc}, \
+
CodeGenerator::InlineRuntimeLUT CodeGenerator::kInlineRuntimeLUT[] = {
- {&CodeGenerator::GenerateIsSmi, "_IsSmi"},
- {&CodeGenerator::GenerateIsNonNegativeSmi, "_IsNonNegativeSmi"},
- {&CodeGenerator::GenerateIsArray, "_IsArray"},
- {&CodeGenerator::GenerateIsRegExp, "_IsRegExp"},
- {&CodeGenerator::GenerateIsConstructCall, "_IsConstructCall"},
- {&CodeGenerator::GenerateArgumentsLength, "_ArgumentsLength"},
- {&CodeGenerator::GenerateArgumentsAccess, "_Arguments"},
- {&CodeGenerator::GenerateClassOf, "_ClassOf"},
- {&CodeGenerator::GenerateValueOf, "_ValueOf"},
- {&CodeGenerator::GenerateSetValueOf, "_SetValueOf"},
- {&CodeGenerator::GenerateFastCharCodeAt, "_FastCharCodeAt"},
- {&CodeGenerator::GenerateCharFromCode, "_CharFromCode"},
- {&CodeGenerator::GenerateObjectEquals, "_ObjectEquals"},
- {&CodeGenerator::GenerateLog, "_Log"},
- {&CodeGenerator::GenerateRandomPositiveSmi, "_RandomPositiveSmi"},
- {&CodeGenerator::GenerateIsObject, "_IsObject"},
- {&CodeGenerator::GenerateIsFunction, "_IsFunction"},
- {&CodeGenerator::GenerateIsUndetectableObject, "_IsUndetectableObject"},
- {&CodeGenerator::GenerateStringAdd, "_StringAdd"},
- {&CodeGenerator::GenerateSubString, "_SubString"},
- {&CodeGenerator::GenerateStringCompare, "_StringCompare"},
- {&CodeGenerator::GenerateRegExpExec, "_RegExpExec"},
- {&CodeGenerator::GenerateNumberToString, "_NumberToString"},
- {&CodeGenerator::GenerateMathPow, "_Math_pow"},
- {&CodeGenerator::GenerateMathSin, "_Math_sin"},
- {&CodeGenerator::GenerateMathCos, "_Math_cos"},
- {&CodeGenerator::GenerateMathSqrt, "_Math_sqrt"},
+ INLINE_RUNTIME_FUNCTION_LIST(INLINE_RUNTIME_ENTRY)
};
+#undef INLINE_RUNTIME_ENTRY
CodeGenerator::InlineRuntimeLUT* CodeGenerator::FindInlineRuntimeLUT(
Handle<String> name) {
@@ -431,6 +407,14 @@
}
+int CodeGenerator::InlineRuntimeCallArgumentsCount(Handle<String> name) {
+ CodeGenerator::InlineRuntimeLUT* f =
+ CodeGenerator::FindInlineRuntimeLUT(name);
+ if (f != NULL) return f->nargs;
+ return -1;
+}
+
+
// Simple condition analysis. ALWAYS_TRUE and ALWAYS_FALSE represent a
// known result for the test expression, with no side effects.
CodeGenerator::ConditionAnalysis CodeGenerator::AnalyzeCondition(
« no previous file with comments | « src/codegen.h ('k') | src/ia32/codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698