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

Unified Diff: src/full-codegen/full-codegen.cc

Issue 2060173002: [fullcodegen] Factor out VisitRegExpLiteral from architectures. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/full-codegen.cc
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc
index 3d352610589f430bc216663758dcf76cd630092c..ec23b21a789e85f6f2766bdfca979dd5d36d4b00 100644
--- a/src/full-codegen/full-codegen.cc
+++ b/src/full-codegen/full-codegen.cc
@@ -1541,6 +1541,19 @@ void FullCodeGenerator::VisitClassLiteral(ClassLiteral* lit) {
context()->Plug(result_register());
}
+void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
+ Comment cmnt(masm_, "[ RegExpLiteral");
+ Callable callable = CodeFactory::FastCloneRegExp(isolate());
+ CallInterfaceDescriptor descriptor = callable.descriptor();
+ LoadFromFrameField(JavaScriptFrameConstants::kFunctionOffset,
+ descriptor.GetRegisterParameter(0));
+ __ Move(descriptor.GetRegisterParameter(1),
+ Smi::FromInt(expr->literal_index()));
+ __ Move(descriptor.GetRegisterParameter(2), expr->pattern());
+ __ Move(descriptor.GetRegisterParameter(3), Smi::FromInt(expr->flags()));
+ __ Call(callable.code(), RelocInfo::CODE_TARGET);
+ context()->Plug(result_register());
+}
void FullCodeGenerator::VisitNativeFunctionLiteral(
NativeFunctionLiteral* expr) {
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698