Chromium Code Reviews

Unified Diff: src/compiler.h

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.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/codegen.cc ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index eb87b5570e37a520b011593c35166976f6a615c2..5c5bb02c722f70b4f8e1d39be45c6b325b8149b0 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -299,6 +299,7 @@ class CompilationInfo {
osr_ast_id_ = osr_ast_id;
unoptimized_code_ = unoptimized;
optimization_id_ = isolate()->NextOptimizationId();
+ set_output_code_kind(Code::OPTIMIZED_FUNCTION);
}
void SetFunctionType(Type::FunctionType* function_type) {
@@ -412,6 +413,10 @@ class CompilationInfo {
base::SmartArrayPointer<char> GetDebugName() const;
+ Code::Kind output_code_kind() const { return output_code_kind_; }
+
+ void set_output_code_kind(Code::Kind kind) { output_code_kind_ = kind; }
+
protected:
ParseInfo* parse_info_;
@@ -451,6 +456,8 @@ class CompilationInfo {
unsigned flags_;
+ Code::Kind output_code_kind_;
+
// For compiled stubs, the stub object
CodeStub* code_stub_;
// The compiled code.
« no previous file with comments | « src/codegen.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine