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

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

Issue 552232: Introduce a stack-allocated structure to encapsulate compile-time information. (Closed)
Patch Set: Remove inadvertently included files. 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 | « src/ia32/codegen-ia32.cc ('k') | src/x64/codegen-x64.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 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 14 matching lines...) Expand all
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_X64_CODEGEN_X64_H_ 28 #ifndef V8_X64_CODEGEN_X64_H_
29 #define V8_X64_CODEGEN_X64_H_ 29 #define V8_X64_CODEGEN_X64_H_
30 30
31 namespace v8 { 31 namespace v8 {
32 namespace internal { 32 namespace internal {
33 33
34 // Forward declarations 34 // Forward declarations
35 class CompilationInfo;
35 class DeferredCode; 36 class DeferredCode;
36 class RegisterAllocator; 37 class RegisterAllocator;
37 class RegisterFile; 38 class RegisterFile;
38 39
39 enum InitState { CONST_INIT, NOT_CONST_INIT }; 40 enum InitState { CONST_INIT, NOT_CONST_INIT };
40 enum TypeofState { INSIDE_TYPEOF, NOT_INSIDE_TYPEOF }; 41 enum TypeofState { INSIDE_TYPEOF, NOT_INSIDE_TYPEOF };
41 42
42 43
43 // ------------------------------------------------------------------------- 44 // -------------------------------------------------------------------------
44 // Reference support 45 // Reference support
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 291
291 // ------------------------------------------------------------------------- 292 // -------------------------------------------------------------------------
292 // CodeGenerator 293 // CodeGenerator
293 294
294 class CodeGenerator: public AstVisitor { 295 class CodeGenerator: public AstVisitor {
295 public: 296 public:
296 // Takes a function literal, generates code for it. This function should only 297 // Takes a function literal, generates code for it. This function should only
297 // be called by compiler.cc. 298 // be called by compiler.cc.
298 static Handle<Code> MakeCode(FunctionLiteral* fun, 299 static Handle<Code> MakeCode(FunctionLiteral* fun,
299 Handle<Script> script, 300 Handle<Script> script,
300 bool is_eval); 301 bool is_eval,
302 CompilationInfo* info);
301 303
302 // Printing of AST, etc. as requested by flags. 304 // Printing of AST, etc. as requested by flags.
303 static void MakeCodePrologue(FunctionLiteral* fun); 305 static void MakeCodePrologue(FunctionLiteral* fun);
304 306
305 // Allocate and install the code. 307 // Allocate and install the code.
306 static Handle<Code> MakeCodeEpilogue(FunctionLiteral* fun, 308 static Handle<Code> MakeCodeEpilogue(FunctionLiteral* fun,
307 MacroAssembler* masm, 309 MacroAssembler* masm,
308 Code::Flags flags, 310 Code::Flags flags,
309 Handle<Script> script); 311 Handle<Script> script);
310 312
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 // reach the end of the statement (ie, it does not exit via break, 375 // reach the end of the statement (ie, it does not exit via break,
374 // continue, return, or throw). This function is used temporarily while 376 // continue, return, or throw). This function is used temporarily while
375 // the code generator is being transformed. 377 // the code generator is being transformed.
376 void VisitAndSpill(Statement* statement); 378 void VisitAndSpill(Statement* statement);
377 379
378 // Visit a list of statements and then spill the virtual frame if control 380 // Visit a list of statements and then spill the virtual frame if control
379 // flow can reach the end of the list. 381 // flow can reach the end of the list.
380 void VisitStatementsAndSpill(ZoneList<Statement*>* statements); 382 void VisitStatementsAndSpill(ZoneList<Statement*>* statements);
381 383
382 // Main code generation function 384 // Main code generation function
383 void GenCode(FunctionLiteral* fun); 385 void GenCode(FunctionLiteral* fun, CompilationInfo* info);
384 386
385 // Generate the return sequence code. Should be called no more than 387 // Generate the return sequence code. Should be called no more than
386 // once per compiled function, immediately after binding the return 388 // once per compiled function, immediately after binding the return
387 // target (which can not be done more than once). 389 // target (which can not be done more than once).
388 void GenerateReturnSequence(Result* return_value); 390 void GenerateReturnSequence(Result* return_value);
389 391
390 // Returns the arguments allocation mode. 392 // Returns the arguments allocation mode.
391 ArgumentsAllocationMode ArgumentsMode() const; 393 ArgumentsAllocationMode ArgumentsMode() const;
392 394
393 // Store the arguments object and allocate it if necessary. 395 // Store the arguments object and allocate it if necessary.
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 Major MajorKey() { return StringCompare; } 814 Major MajorKey() { return StringCompare; }
813 int MinorKey() { return 0; } 815 int MinorKey() { return 0; }
814 816
815 void Generate(MacroAssembler* masm); 817 void Generate(MacroAssembler* masm);
816 }; 818 };
817 819
818 820
819 } } // namespace v8::internal 821 } } // namespace v8::internal
820 822
821 #endif // V8_X64_CODEGEN_X64_H_ 823 #endif // V8_X64_CODEGEN_X64_H_
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698