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

Unified Diff: src/codegen.cc

Issue 2840018: [Isolates] Moved more compilation-related globals (builtins, runtime, &c.)... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: rebase 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/codegen.h ('k') | src/compiler.cc » ('j') | src/runtime.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.cc
===================================================================
--- src/codegen.cc (revision 4955)
+++ src/codegen.cc (working copy)
@@ -337,25 +337,15 @@
}
-// 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.
-
-#define INLINE_RUNTIME_ENTRY(Name, argc, ressize) \
- {&CodeGenerator::Generate##Name, "_" #Name, argc}, \
-
-CodeGenerator::InlineRuntimeLUT CodeGenerator::kInlineRuntimeLUT[] = {
- INLINE_RUNTIME_FUNCTION_LIST(INLINE_RUNTIME_ENTRY)
-};
-
-#undef INLINE_RUNTIME_ENTRY
-
-CodeGenerator::InlineRuntimeLUT* CodeGenerator::FindInlineRuntimeLUT(
+InlineRuntimeFunctionsTable::Entry* CodeGenerator::FindInlineRuntimeLUT(
Handle<String> name) {
- const int entries_count =
- sizeof(kInlineRuntimeLUT) / sizeof(InlineRuntimeLUT);
- for (int i = 0; i < entries_count; i++) {
- InlineRuntimeLUT* entry = &kInlineRuntimeLUT[i];
+ Isolate* isolate = Isolate::Current();
+ InlineRuntimeFunctionsTable::Entry* entries =
+ isolate->inline_runtime_functions_table()->entries();
+ for (int i = 0;
+ i < InlineRuntimeFunctionsTable::kInlineRuntimeFunctionsTableSize;
+ ++i) {
+ InlineRuntimeFunctionsTable::Entry* entry = &entries[i];
if (name->IsEqualTo(CStrVector(entry->name))) {
return entry;
}
@@ -368,7 +358,7 @@
ZoneList<Expression*>* args = node->arguments();
Handle<String> name = node->name();
if (name->length() > 0 && name->Get(0) == '_') {
- InlineRuntimeLUT* entry = FindInlineRuntimeLUT(name);
+ InlineRuntimeFunctionsTable::Entry* entry = FindInlineRuntimeLUT(name);
if (entry != NULL) {
((*this).*(entry->method))(args);
return true;
@@ -379,9 +369,9 @@
bool CodeGenerator::PatchInlineRuntimeEntry(Handle<String> name,
- const CodeGenerator::InlineRuntimeLUT& new_entry,
- CodeGenerator::InlineRuntimeLUT* old_entry) {
- InlineRuntimeLUT* entry = FindInlineRuntimeLUT(name);
+ const InlineRuntimeFunctionsTable::Entry& new_entry,
+ InlineRuntimeFunctionsTable::Entry* old_entry) {
+ InlineRuntimeFunctionsTable::Entry* entry = FindInlineRuntimeLUT(name);
if (entry == NULL) return false;
if (old_entry != NULL) {
old_entry->name = entry->name;
@@ -394,7 +384,7 @@
int CodeGenerator::InlineRuntimeCallArgumentsCount(Handle<String> name) {
- CodeGenerator::InlineRuntimeLUT* f =
+ InlineRuntimeFunctionsTable::Entry* f =
CodeGenerator::FindInlineRuntimeLUT(name);
if (f != NULL) return f->nargs;
return -1;
« no previous file with comments | « src/codegen.h ('k') | src/compiler.cc » ('j') | src/runtime.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698