| OLD | NEW |
| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 static bool MakeCode(CompilationInfo* info); | 301 static bool MakeCode(CompilationInfo* info); |
| 302 | 302 |
| 303 // Printing of AST, etc. as requested by flags. | 303 // Printing of AST, etc. as requested by flags. |
| 304 static void MakeCodePrologue(CompilationInfo* info); | 304 static void MakeCodePrologue(CompilationInfo* info); |
| 305 | 305 |
| 306 // Allocate and install the code. | 306 // Allocate and install the code. |
| 307 static Handle<Code> MakeCodeEpilogue(MacroAssembler* masm, | 307 static Handle<Code> MakeCodeEpilogue(MacroAssembler* masm, |
| 308 Code::Flags flags, | 308 Code::Flags flags, |
| 309 CompilationInfo* info); | 309 CompilationInfo* info); |
| 310 | 310 |
| 311 // Print the code after compiling it. |
| 312 static void PrintCode(Handle<Code> code, CompilationInfo* info); |
| 313 |
| 311 #ifdef ENABLE_LOGGING_AND_PROFILING | 314 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 312 static bool ShouldGenerateLog(Expression* type); | 315 static bool ShouldGenerateLog(Expression* type); |
| 313 #endif | 316 #endif |
| 314 | 317 |
| 315 static bool RecordPositions(MacroAssembler* masm, | 318 static bool RecordPositions(MacroAssembler* masm, |
| 316 int pos, | 319 int pos, |
| 317 bool right_here = false); | 320 bool right_here = false); |
| 318 | 321 |
| 319 // Accessors | 322 // Accessors |
| 320 MacroAssembler* masm() { return masm_; } | 323 MacroAssembler* masm() { return masm_; } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 366 |
| 364 // Track loop nesting level. | 367 // Track loop nesting level. |
| 365 int loop_nesting() const { return loop_nesting_; } | 368 int loop_nesting() const { return loop_nesting_; } |
| 366 void IncrementLoopNesting() { loop_nesting_++; } | 369 void IncrementLoopNesting() { loop_nesting_++; } |
| 367 void DecrementLoopNesting() { loop_nesting_--; } | 370 void DecrementLoopNesting() { loop_nesting_--; } |
| 368 | 371 |
| 369 | 372 |
| 370 // Node visitors. | 373 // Node visitors. |
| 371 void VisitStatements(ZoneList<Statement*>* statements); | 374 void VisitStatements(ZoneList<Statement*>* statements); |
| 372 | 375 |
| 373 #define DEF_VISIT(type) \ | 376 virtual void VisitSlot(Slot* node); |
| 374 void Visit##type(type* node); | 377 #define DEF_VISIT(type) \ |
| 378 virtual void Visit##type(type* node); |
| 375 AST_NODE_LIST(DEF_VISIT) | 379 AST_NODE_LIST(DEF_VISIT) |
| 376 #undef DEF_VISIT | 380 #undef DEF_VISIT |
| 377 | 381 |
| 378 // Visit a statement and then spill the virtual frame if control flow can | 382 // Visit a statement and then spill the virtual frame if control flow can |
| 379 // reach the end of the statement (ie, it does not exit via break, | 383 // reach the end of the statement (ie, it does not exit via break, |
| 380 // continue, return, or throw). This function is used temporarily while | 384 // continue, return, or throw). This function is used temporarily while |
| 381 // the code generator is being transformed. | 385 // the code generator is being transformed. |
| 382 void VisitAndSpill(Statement* statement); | 386 void VisitAndSpill(Statement* statement); |
| 383 | 387 |
| 384 // Visit a list of statements and then spill the virtual frame if control | 388 // Visit a list of statements and then spill the virtual frame if control |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 friend class CodeGeneratorPatcher; // Used in test-log-stack-tracer.cc | 742 friend class CodeGeneratorPatcher; // Used in test-log-stack-tracer.cc |
| 739 friend class InlineRuntimeFunctionsTable; | 743 friend class InlineRuntimeFunctionsTable; |
| 740 | 744 |
| 741 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 745 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
| 742 }; | 746 }; |
| 743 | 747 |
| 744 | 748 |
| 745 } } // namespace v8::internal | 749 } } // namespace v8::internal |
| 746 | 750 |
| 747 #endif // V8_X64_CODEGEN_X64_H_ | 751 #endif // V8_X64_CODEGEN_X64_H_ |
| OLD | NEW |