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

Unified Diff: src/compiler.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 | « src/compiler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index db0fd7be7d10a50125b308bbcd782c96c40558b0..1af7cb9b7cd8aace27aacb4710580bebf7a23fc2 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -154,7 +154,9 @@ CompilationInfo::CompilationInfo(CodeStub* stub, Isolate* isolate, Zone* zone)
CompilationInfo::CompilationInfo(const char* debug_name, Isolate* isolate,
Zone* zone)
- : CompilationInfo(nullptr, nullptr, debug_name, STUB, isolate, zone) {}
+ : CompilationInfo(nullptr, nullptr, debug_name, STUB, isolate, zone) {
+ set_output_code_kind(Code::STUB);
+}
CompilationInfo::CompilationInfo(ParseInfo* parse_info, CodeStub* code_stub,
const char* debug_name, Mode mode,
@@ -188,6 +190,9 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info, CodeStub* code_stub,
if (descriptor.function_mode() == NOT_JS_FUNCTION_STUB_MODE) {
parameter_count_--;
}
+ set_output_code_kind(code_stub->GetCodeKind());
+ } else {
+ set_output_code_kind(Code::FUNCTION);
}
}
@@ -208,6 +213,7 @@ void CompilationInfo::SetStub(CodeStub* code_stub) {
SetMode(STUB);
code_stub_ = code_stub;
debug_name_ = CodeStub::MajorName(code_stub->MajorKey());
+ set_output_code_kind(code_stub->GetCodeKind());
}
« no previous file with comments | « src/compiler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698