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

Unified Diff: src/full-codegen/full-codegen.cc

Issue 2284313003: Separate CompilationInfo into its own file. (Closed)
Patch Set: fix Created 4 years, 4 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/full-codegen/full-codegen.h ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/full-codegen.cc
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc
index 657b97934b514e3d7f7faff2270e5e8f53dd1209..2ca5de148a9af78b32dbabb21731311bf9683517 100644
--- a/src/full-codegen/full-codegen.cc
+++ b/src/full-codegen/full-codegen.cc
@@ -10,6 +10,7 @@
#include "src/ast/scopes.h"
#include "src/code-factory.h"
#include "src/codegen.h"
+#include "src/compilation-info.h"
#include "src/compiler.h"
#include "src/debug/debug.h"
#include "src/debug/liveedit.h"
@@ -43,12 +44,43 @@ class FullCodegenCompilationJob final : public CompilationJob {
CompilationJob::Status FinalizeJobImpl() final { return SUCCEEDED; }
};
+FullCodeGenerator::FullCodeGenerator(MacroAssembler* masm,
+ CompilationInfo* info,
+ uintptr_t stack_limit)
+ : masm_(masm),
+ info_(info),
+ isolate_(info->isolate()),
+ zone_(info->zone()),
+ scope_(info->scope()),
+ nesting_stack_(NULL),
+ loop_depth_(0),
+ operand_stack_depth_(0),
+ globals_(NULL),
+ context_(NULL),
+ bailout_entries_(info->HasDeoptimizationSupport()
+ ? info->literal()->ast_node_count()
+ : 0,
+ info->zone()),
+ back_edges_(2, info->zone()),
+ handler_table_(info->zone()),
+ source_position_table_builder_(info->zone(),
+ info->SourcePositionRecordingMode()),
+ ic_total_count_(0) {
+ DCHECK(!info->IsStub());
+ Initialize(stack_limit);
+}
+
// static
CompilationJob* FullCodeGenerator::NewCompilationJob(CompilationInfo* info) {
return new FullCodegenCompilationJob(info);
}
// static
+bool FullCodeGenerator::MakeCode(CompilationInfo* info) {
+ return MakeCode(info, info->isolate()->stack_guard()->real_climit());
+}
+
+// static
bool FullCodeGenerator::MakeCode(CompilationInfo* info, uintptr_t stack_limit) {
Isolate* isolate = info->isolate();
@@ -1965,6 +1997,17 @@ bool FullCodeGenerator::NeedsHoleCheckForLoad(VariableProxy* proxy) {
var->initializer_position() >= proxy->position();
}
+Handle<Script> FullCodeGenerator::script() { return info_->script(); }
+
+LanguageMode FullCodeGenerator::language_mode() {
+ return scope()->language_mode();
+}
+
+bool FullCodeGenerator::has_simple_parameters() {
+ return info_->has_simple_parameters();
+}
+
+FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); }
#undef __
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698