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 __ |