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

Unified Diff: src/codegen.cc

Issue 14307006: Make it possible to Crankshaft all kinds of stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 8 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/code-stubs-hydrogen.cc ('k') | src/compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.cc
diff --git a/src/codegen.cc b/src/codegen.cc
index 90ab2b5a209713bd51eb7f26fc9c934dc06e4ae9..ff4003c1eff09b5a76d9c60e802b3c2575620469 100644
--- a/src/codegen.cc
+++ b/src/codegen.cc
@@ -106,10 +106,13 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm,
// Allocate and install the code.
CodeDesc desc;
+ bool is_crankshafted =
+ Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION ||
+ info->IsStub();
masm->GetCode(&desc);
Handle<Code> code =
- isolate->factory()->NewCode(desc, flags, masm->CodeObject());
-
+ isolate->factory()->NewCode(desc, flags, masm->CodeObject(),
+ false, is_crankshafted);
if (!code.is_null()) {
isolate->counters()->total_compiled_code_size()->Increment(
code->instruction_size());
@@ -129,7 +132,7 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
if (print_code) {
// Print the source code if available.
FunctionLiteral* function = info->function();
- if (code->kind() != Code::COMPILED_STUB) {
+ if (code->kind() == Code::OPTIMIZED_FUNCTION) {
Handle<Script> script = info->script();
if (!script->IsUndefined() && !script->source()->IsUndefined()) {
PrintF("--- Raw source ---\n");
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698