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

Unified Diff: src/full-codegen.h

Issue 9187005: Enable optimization of top-level code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: fixed problem with eval code, addressed comments Created 8 years, 10 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
« src/compiler.cc ('K') | « src/compiler.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.h
===================================================================
--- src/full-codegen.h (revision 10686)
+++ src/full-codegen.h (working copy)
@@ -77,29 +77,32 @@
TOS_REG
};
- explicit FullCodeGenerator(MacroAssembler* masm)
+ FullCodeGenerator(MacroAssembler* masm, CompilationInfo* info)
: masm_(masm),
- info_(NULL),
- scope_(NULL),
+ info_(info),
+ scope_(info->scope()),
nesting_stack_(NULL),
loop_depth_(0),
global_count_(0),
context_(NULL),
- bailout_entries_(0),
+ bailout_entries_(info->HasDeoptimizationSupport()
+ ? info->function()->ast_node_count() : 0),
stack_checks_(2), // There's always at least one.
- type_feedback_cells_(0) {
- }
+ type_feedback_cells_(info->HasDeoptimizationSupport()
+ ? info->function()->ast_node_count() : 0) { }
static bool MakeCode(CompilationInfo* info);
- void Generate(CompilationInfo* info);
+ void Generate();
void PopulateDeoptimizationData(Handle<Code> code);
void PopulateTypeFeedbackCells(Handle<Code> code);
Handle<FixedArray> handler_table() { return handler_table_; }
- class StateField : public BitField<State, 0, 8> { };
- class PcField : public BitField<unsigned, 8, 32-8> { };
+ // Encode state and pc-offset as a BitField<type, start, size>.
+ // Only use 30 bits because we encode the result as a smi.
+ class StateField : public BitField<State, 0, 1> { };
+ class PcField : public BitField<unsigned, 1, 30-1> { };
static const char* State2String(State state) {
switch (state) {
« src/compiler.cc ('K') | « src/compiler.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698