OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 int loop_nesting() const { return loop_nesting_; } | 354 int loop_nesting() const { return loop_nesting_; } |
355 void IncrementLoopNesting() { loop_nesting_++; } | 355 void IncrementLoopNesting() { loop_nesting_++; } |
356 void DecrementLoopNesting() { loop_nesting_--; } | 356 void DecrementLoopNesting() { loop_nesting_--; } |
357 | 357 |
358 | 358 |
359 // Node visitors. | 359 // Node visitors. |
360 void VisitStatements(ZoneList<Statement*>* statements); | 360 void VisitStatements(ZoneList<Statement*>* statements); |
361 | 361 |
362 #define DEF_VISIT(type) \ | 362 #define DEF_VISIT(type) \ |
363 void Visit##type(type* node); | 363 void Visit##type(type* node); |
364 NODE_LIST(DEF_VISIT) | 364 AST_NODE_LIST(DEF_VISIT) |
365 #undef DEF_VISIT | 365 #undef DEF_VISIT |
366 | 366 |
367 // Visit a statement and then spill the virtual frame if control flow can | 367 // Visit a statement and then spill the virtual frame if control flow can |
368 // reach the end of the statement (ie, it does not exit via break, | 368 // reach the end of the statement (ie, it does not exit via break, |
369 // continue, return, or throw). This function is used temporarily while | 369 // continue, return, or throw). This function is used temporarily while |
370 // the code generator is being transformed. | 370 // the code generator is being transformed. |
371 void VisitAndSpill(Statement* statement); | 371 void VisitAndSpill(Statement* statement); |
372 | 372 |
373 // Visit a list of statements and then spill the virtual frame if control | 373 // Visit a list of statements and then spill the virtual frame if control |
374 // flow can reach the end of the list. | 374 // flow can reach the end of the list. |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 enum MathOp { SIN, COS }; | 541 enum MathOp { SIN, COS }; |
542 void GenerateFastMathOp(MathOp op, ZoneList<Expression*>* args); | 542 void GenerateFastMathOp(MathOp op, ZoneList<Expression*>* args); |
543 inline void GenerateMathSin(ZoneList<Expression*>* args); | 543 inline void GenerateMathSin(ZoneList<Expression*>* args); |
544 inline void GenerateMathCos(ZoneList<Expression*>* args); | 544 inline void GenerateMathCos(ZoneList<Expression*>* args); |
545 | 545 |
546 // Methods used to indicate which source code is generated for. Source | 546 // Methods used to indicate which source code is generated for. Source |
547 // positions are collected by the assembler and emitted with the relocation | 547 // positions are collected by the assembler and emitted with the relocation |
548 // information. | 548 // information. |
549 void CodeForFunctionPosition(FunctionLiteral* fun); | 549 void CodeForFunctionPosition(FunctionLiteral* fun); |
550 void CodeForReturnPosition(FunctionLiteral* fun); | 550 void CodeForReturnPosition(FunctionLiteral* fun); |
551 void CodeForStatementPosition(Node* node); | 551 void CodeForStatementPosition(AstNode* node); |
552 void CodeForSourcePosition(int pos); | 552 void CodeForSourcePosition(int pos); |
553 | 553 |
554 #ifdef DEBUG | 554 #ifdef DEBUG |
555 // True if the registers are valid for entry to a block. There should | 555 // True if the registers are valid for entry to a block. There should |
556 // be no frame-external references to (non-reserved) registers. | 556 // be no frame-external references to (non-reserved) registers. |
557 bool HasValidEntryRegisters(); | 557 bool HasValidEntryRegisters(); |
558 #endif | 558 #endif |
559 | 559 |
560 bool is_eval_; // Tells whether code is generated for eval. | 560 bool is_eval_; // Tells whether code is generated for eval. |
561 Handle<Script> script_; | 561 Handle<Script> script_; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 friend class Reference; | 593 friend class Reference; |
594 friend class Result; | 594 friend class Result; |
595 | 595 |
596 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 596 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
597 }; | 597 }; |
598 | 598 |
599 | 599 |
600 } } // namespace v8::internal | 600 } } // namespace v8::internal |
601 | 601 |
602 #endif // V8_X64_CODEGEN_X64_H_ | 602 #endif // V8_X64_CODEGEN_X64_H_ |
OLD | NEW |