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

Unified Diff: src/codegen.cc

Issue 1356363004: Add CompilationInfo::output_code_kind to allow overriding the kind of code generated. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | 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 4791fe0e2dc352941fcf28dbacc53e36ba437233..f1c254e91db73a83ddbea52573c8be9ebc08f768 100644
--- a/src/codegen.cc
+++ b/src/codegen.cc
@@ -144,16 +144,15 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm,
CompilationInfo* info) {
Isolate* isolate = info->isolate();
- Code::Flags flags =
- info->IsStub()
- ? info->code_stub()
- ? Code::ComputeFlags(info->code_stub()->GetCodeKind(),
- info->code_stub()->GetICState(),
- info->code_stub()->GetExtraICState(),
- info->code_stub()->GetStubType())
- : Code::ComputeFlags(Code::STUB)
- : Code::ComputeFlags(info->IsOptimizing() ? Code::OPTIMIZED_FUNCTION
- : Code::FUNCTION);
+ Code::Flags flags;
+ if (info->IsStub() && info->code_stub()) {
+ DCHECK_EQ(info->output_code_kind(), info->code_stub()->GetCodeKind());
+ flags = Code::ComputeFlags(
+ info->output_code_kind(), info->code_stub()->GetICState(),
+ info->code_stub()->GetExtraICState(), info->code_stub()->GetStubType());
+ } else {
+ flags = Code::ComputeFlags(info->output_code_kind());
+ }
// Allocate and install the code.
CodeDesc desc;
« no previous file with comments | « no previous file | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698