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

Unified Diff: src/builtins/builtins.cc

Issue 2502293002: Reland of [refactoring] Split CodeAssemblerState out of CodeAssembler (Closed)
Patch Set: fix Created 4 years, 1 month 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/builtins/builtins.h ('k') | src/builtins/builtins-array.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins.cc
diff --git a/src/builtins/builtins.cc b/src/builtins/builtins.cc
index ec981fe01edba1beea76c7805a86841bf4d8a911..5997eb35506054e084c3a8394ea5f79b70aa8852 100644
--- a/src/builtins/builtins.cc
+++ b/src/builtins/builtins.cc
@@ -4,7 +4,7 @@
#include "src/builtins/builtins.h"
#include "src/code-events.h"
-#include "src/code-stub-assembler.h"
+#include "src/compiler/code-assembler.h"
#include "src/ic/ic-state.h"
#include "src/interface-descriptors.h"
#include "src/isolate.h"
@@ -42,7 +42,7 @@ void PostBuildProfileAndTracing(Isolate* isolate, Code* code,
}
typedef void (*MacroAssemblerGenerator)(MacroAssembler*);
-typedef void (*CodeAssemblerGenerator)(CodeStubAssembler*);
+typedef void (*CodeAssemblerGenerator)(compiler::CodeAssemblerState*);
Code* BuildWithMacroAssembler(Isolate* isolate,
MacroAssemblerGenerator generator,
@@ -86,9 +86,10 @@ Code* BuildWithCodeStubAssemblerJS(Isolate* isolate,
Zone zone(isolate->allocator(), ZONE_NAME);
const int argc_with_recv =
(argc == SharedFunctionInfo::kDontAdaptArgumentsSentinel) ? 0 : argc + 1;
- CodeStubAssembler assembler(isolate, &zone, argc_with_recv, flags, name);
- generator(&assembler);
- Handle<Code> code = assembler.GenerateCode();
+ compiler::CodeAssemblerState state(isolate, &zone, argc_with_recv, flags,
+ name);
+ generator(&state);
+ Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state);
PostBuildProfileAndTracing(isolate, *code, name);
return *code;
}
@@ -105,9 +106,9 @@ Code* BuildWithCodeStubAssemblerCS(Isolate* isolate,
CallInterfaceDescriptor descriptor(isolate, interface_descriptor);
// Ensure descriptor is already initialized.
DCHECK_LE(0, descriptor.GetRegisterParameterCount());
- CodeStubAssembler assembler(isolate, &zone, descriptor, flags, name);
- generator(&assembler);
- Handle<Code> code = assembler.GenerateCode();
+ compiler::CodeAssemblerState state(isolate, &zone, descriptor, flags, name);
+ generator(&state);
+ Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state);
PostBuildProfileAndTracing(isolate, *code, name);
return *code;
}
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/builtins-array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698