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

Side by Side Diff: src/full-codegen.h

Issue 11093074: Get rid of static module allocation, do it in code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed last comments; added other back-ends Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/contexts.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 TestContext context(this, expr, if_true, if_false, fall_through); 389 TestContext context(this, expr, if_true, if_false, fall_through);
390 Visit(expr); 390 Visit(expr);
391 // For test contexts, we prepare for bailout before branching, not at 391 // For test contexts, we prepare for bailout before branching, not at
392 // the end of the entire expression. This happens as part of visiting 392 // the end of the entire expression. This happens as part of visiting
393 // the expression. 393 // the expression.
394 } 394 }
395 395
396 void VisitInDuplicateContext(Expression* expr); 396 void VisitInDuplicateContext(Expression* expr);
397 397
398 void VisitDeclarations(ZoneList<Declaration*>* declarations); 398 void VisitDeclarations(ZoneList<Declaration*>* declarations);
399 void DeclareModules(Handle<FixedArray> descriptions);
399 void DeclareGlobals(Handle<FixedArray> pairs); 400 void DeclareGlobals(Handle<FixedArray> pairs);
400 int DeclareGlobalsFlags(); 401 int DeclareGlobalsFlags();
401 402
403 // Generate code to allocate all (including nested) modules and contexts.
404 // Because of recursive linking and the presence of module alias declarations,
405 // this has to be a separate pass _before_ populating or executing any module.
406 void AllocateModules(ZoneList<Declaration*>* declarations);
407
402 // Try to perform a comparison as a fast inlined literal compare if 408 // Try to perform a comparison as a fast inlined literal compare if
403 // the operands allow it. Returns true if the compare operations 409 // the operands allow it. Returns true if the compare operations
404 // has been matched and all code generated; false otherwise. 410 // has been matched and all code generated; false otherwise.
405 bool TryLiteralCompare(CompareOperation* compare); 411 bool TryLiteralCompare(CompareOperation* compare);
406 412
407 // Platform-specific code for comparing the type of a value with 413 // Platform-specific code for comparing the type of a value with
408 // a given literal string. 414 // a given literal string.
409 void EmitLiteralCompareTypeof(Expression* expr, 415 void EmitLiteralCompareTypeof(Expression* expr,
410 Expression* sub_expr, 416 Expression* sub_expr,
411 Handle<String> check); 417 Handle<String> check);
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 virtual bool IsEffect() const { return true; } 803 virtual bool IsEffect() const { return true; }
798 }; 804 };
799 805
800 MacroAssembler* masm_; 806 MacroAssembler* masm_;
801 CompilationInfo* info_; 807 CompilationInfo* info_;
802 Scope* scope_; 808 Scope* scope_;
803 Label return_label_; 809 Label return_label_;
804 NestedStatement* nesting_stack_; 810 NestedStatement* nesting_stack_;
805 int loop_depth_; 811 int loop_depth_;
806 ZoneList<Handle<Object> >* globals_; 812 ZoneList<Handle<Object> >* globals_;
813 Handle<FixedArray> modules_;
814 int module_index_;
807 const ExpressionContext* context_; 815 const ExpressionContext* context_;
808 ZoneList<BailoutEntry> bailout_entries_; 816 ZoneList<BailoutEntry> bailout_entries_;
809 ZoneList<BailoutEntry> stack_checks_; 817 ZoneList<BailoutEntry> stack_checks_;
810 ZoneList<TypeFeedbackCellEntry> type_feedback_cells_; 818 ZoneList<TypeFeedbackCellEntry> type_feedback_cells_;
811 int ic_total_count_; 819 int ic_total_count_;
812 Handle<FixedArray> handler_table_; 820 Handle<FixedArray> handler_table_;
813 Handle<JSGlobalPropertyCell> profiling_counter_; 821 Handle<JSGlobalPropertyCell> profiling_counter_;
814 bool generate_debug_code_; 822 bool generate_debug_code_;
815 Zone* zone_; 823 Zone* zone_;
816 824
(...skipping 21 matching lines...) Expand all
838 } 846 }
839 847
840 private: 848 private:
841 Zone* zone_; 849 Zone* zone_;
842 }; 850 };
843 851
844 852
845 } } // namespace v8::internal 853 } } // namespace v8::internal
846 854
847 #endif // V8_FULL_CODEGEN_H_ 855 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698