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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 1635553002: [Interpreter] Add native function literal support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add back some skips for Arm64 Created 4 years, 11 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/full-codegen.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 37cd938a15dacfe65548c79fa4713a83298fc46e..ebfdf33c581585628e491e43102b366e18f6ea77 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -1213,7 +1213,11 @@ void BytecodeGenerator::VisitClassLiteral(ClassLiteral* expr) {
void BytecodeGenerator::VisitNativeFunctionLiteral(
NativeFunctionLiteral* expr) {
- UNIMPLEMENTED();
+ // Find or build a shared function info for the native function template.
+ Handle<SharedFunctionInfo> shared_info =
+ Compiler::GetSharedFunctionInfoForNative(expr->extension(), expr->name());
+ builder()->CreateClosure(shared_info, NOT_TENURED);
+ execution_result()->SetResultInAccumulator();
}
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698