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

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

Issue 651031: Begin using a list of bailouts instead of a singleton in the fast code generator. (Closed)
Patch Set: Created 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/arm/codegen-arm.cc » ('j') | src/compiler.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 JumpTarget* false_target_; 143 JumpTarget* false_target_;
144 CodeGenState* previous_; 144 CodeGenState* previous_;
145 }; 145 };
146 146
147 147
148 // ------------------------------------------------------------------------- 148 // -------------------------------------------------------------------------
149 // CodeGenerator 149 // CodeGenerator
150 150
151 class CodeGenerator: public AstVisitor { 151 class CodeGenerator: public AstVisitor {
152 public: 152 public:
153 // Compilation mode. Either the compiler is used as the primary
154 // compiler and needs to setup everything or the compiler is used as
155 // the secondary compiler for split compilation and has to handle
156 // bailouts.
157 enum Mode {
158 PRIMARY,
159 SECONDARY
160 };
161
162 // Takes a function literal, generates code for it. This function should only 153 // Takes a function literal, generates code for it. This function should only
163 // be called by compiler.cc. 154 // be called by compiler.cc.
164 static Handle<Code> MakeCode(CompilationInfo* info); 155 static Handle<Code> MakeCode(CompilationInfo* info);
165 156
166 // Printing of AST, etc. as requested by flags. 157 // Printing of AST, etc. as requested by flags.
167 static void MakeCodePrologue(CompilationInfo* info); 158 static void MakeCodePrologue(CompilationInfo* info);
168 159
169 // Allocate and install the code. 160 // Allocate and install the code.
170 static Handle<Code> MakeCodeEpilogue(MacroAssembler* masm, 161 static Handle<Code> MakeCodeEpilogue(MacroAssembler* masm,
171 Code::Flags flags, 162 Code::Flags flags,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // reach the end of the statement (ie, it does not exit via break, 228 // reach the end of the statement (ie, it does not exit via break,
238 // continue, return, or throw). This function is used temporarily while 229 // continue, return, or throw). This function is used temporarily while
239 // the code generator is being transformed. 230 // the code generator is being transformed.
240 inline void VisitAndSpill(Statement* statement); 231 inline void VisitAndSpill(Statement* statement);
241 232
242 // Visit a list of statements and then spill the virtual frame if control 233 // Visit a list of statements and then spill the virtual frame if control
243 // flow can reach the end of the list. 234 // flow can reach the end of the list.
244 inline void VisitStatementsAndSpill(ZoneList<Statement*>* statements); 235 inline void VisitStatementsAndSpill(ZoneList<Statement*>* statements);
245 236
246 // Main code generation function 237 // Main code generation function
247 void Generate(CompilationInfo* info, Mode mode); 238 void Generate(CompilationInfo* info);
248 239
249 // The following are used by class Reference. 240 // The following are used by class Reference.
250 void LoadReference(Reference* ref); 241 void LoadReference(Reference* ref);
251 void UnloadReference(Reference* ref); 242 void UnloadReference(Reference* ref);
252 243
253 static MemOperand ContextOperand(Register context, int index) { 244 static MemOperand ContextOperand(Register context, int index) {
254 return MemOperand(context, Context::SlotOffset(index)); 245 return MemOperand(context, Context::SlotOffset(index));
255 } 246 }
256 247
257 MemOperand SlotOperand(Slot* slot, Register tmp); 248 MemOperand SlotOperand(Slot* slot, Register tmp);
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 Major MajorKey() { return StringCompare; } 612 Major MajorKey() { return StringCompare; }
622 int MinorKey() { return 0; } 613 int MinorKey() { return 0; }
623 614
624 void Generate(MacroAssembler* masm); 615 void Generate(MacroAssembler* masm);
625 }; 616 };
626 617
627 618
628 } } // namespace v8::internal 619 } } // namespace v8::internal
629 620
630 #endif // V8_ARM_CODEGEN_ARM_H_ 621 #endif // V8_ARM_CODEGEN_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/codegen-arm.cc » ('j') | src/compiler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698