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

Unified Diff: src/factory.cc

Issue 1161393007: OLD type Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 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/deoptimizer.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 4aca8854565c06b97d33fd11a9783313b3434613..08997c46cdecab25ffdf59b27ad37a0be074662a 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1378,6 +1378,17 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
result->MarkForOptimization();
}
+ if (info->asm_mode() == ASM_FUNCTION) {
+ DCHECK(info->num_literals() == 0);
+ DCHECK(info->asm_code()->kind() == Code::OPTIMIZED_FUNCTION);
+ result->ReplaceCode(info->asm_code());
+ if (FLAG_trace_asm) {
+ PrintF("[asm: installing function %s]\n",
+ info->DebugName()->ToCString().get());
+ }
+ return result;
+ }
+
int index = info->SearchOptimizedCodeMap(context->native_context(),
BailoutId::None());
if (!info->bound() && index < 0) {
« no previous file with comments | « src/deoptimizer.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698