| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 : chunk_(chunk), | 49 : chunk_(chunk), |
| 50 masm_(assembler), | 50 masm_(assembler), |
| 51 info_(info), | 51 info_(info), |
| 52 current_block_(-1), | 52 current_block_(-1), |
| 53 current_instruction_(-1), | 53 current_instruction_(-1), |
| 54 instructions_(chunk->instructions()), | 54 instructions_(chunk->instructions()), |
| 55 deoptimizations_(4), | 55 deoptimizations_(4), |
| 56 jump_table_(4), | 56 jump_table_(4), |
| 57 deoptimization_literals_(8), | 57 deoptimization_literals_(8), |
| 58 inlined_function_count_(0), | 58 inlined_function_count_(0), |
| 59 scope_(chunk->graph()->info()->scope()), | 59 scope_(info->scope()), |
| 60 status_(UNUSED), | 60 status_(UNUSED), |
| 61 deferred_(8), | 61 deferred_(8), |
| 62 osr_pc_offset_(-1), | 62 osr_pc_offset_(-1), |
| 63 resolver_(this) { | 63 resolver_(this) { |
| 64 PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 64 PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 // Simple accessors. | 67 // Simple accessors. |
| 68 MacroAssembler* masm() const { return masm_; } | 68 MacroAssembler* masm() const { return masm_; } |
| 69 Isolate* isolate() const { return info_->isolate(); } | 69 Isolate* isolate() const { return info_->isolate(); } |
| 70 CompilationInfo* info() const { return info_; } |
| 70 | 71 |
| 71 // Support for converting LOperands to assembler types. | 72 // Support for converting LOperands to assembler types. |
| 72 Register ToRegister(LOperand* op) const; | 73 Register ToRegister(LOperand* op) const; |
| 73 XMMRegister ToDoubleRegister(LOperand* op) const; | 74 XMMRegister ToDoubleRegister(LOperand* op) const; |
| 74 bool IsInteger32Constant(LConstantOperand* op) const; | 75 bool IsInteger32Constant(LConstantOperand* op) const; |
| 75 int ToInteger32(LConstantOperand* op) const; | 76 int ToInteger32(LConstantOperand* op) const; |
| 76 bool IsTaggedConstant(LConstantOperand* op) const; | 77 bool IsTaggedConstant(LConstantOperand* op) const; |
| 77 Handle<Object> ToHandle(LConstantOperand* op) const; | 78 Handle<Object> ToHandle(LConstantOperand* op) const; |
| 78 Operand ToOperand(LOperand* op) const; | 79 Operand ToOperand(LOperand* op) const; |
| 79 | 80 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 DONE, | 114 DONE, |
| 114 ABORTED | 115 ABORTED |
| 115 }; | 116 }; |
| 116 | 117 |
| 117 bool is_unused() const { return status_ == UNUSED; } | 118 bool is_unused() const { return status_ == UNUSED; } |
| 118 bool is_generating() const { return status_ == GENERATING; } | 119 bool is_generating() const { return status_ == GENERATING; } |
| 119 bool is_done() const { return status_ == DONE; } | 120 bool is_done() const { return status_ == DONE; } |
| 120 bool is_aborted() const { return status_ == ABORTED; } | 121 bool is_aborted() const { return status_ == ABORTED; } |
| 121 | 122 |
| 122 int strict_mode_flag() const { | 123 int strict_mode_flag() const { |
| 123 return info_->is_strict() ? kStrictMode : kNonStrictMode; | 124 return info()->is_strict() ? kStrictMode : kNonStrictMode; |
| 124 } | 125 } |
| 125 | 126 |
| 126 LChunk* chunk() const { return chunk_; } | 127 LChunk* chunk() const { return chunk_; } |
| 127 Scope* scope() const { return scope_; } | 128 Scope* scope() const { return scope_; } |
| 128 HGraph* graph() const { return chunk_->graph(); } | 129 HGraph* graph() const { return chunk_->graph(); } |
| 129 | 130 |
| 130 int GetNextEmittedBlock(int block); | 131 int GetNextEmittedBlock(int block); |
| 131 LInstruction* GetNextInstruction(); | 132 LInstruction* GetNextInstruction(); |
| 132 | 133 |
| 133 void EmitClassOfTest(Label* if_true, | 134 void EmitClassOfTest(Label* if_true, |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 private: | 298 private: |
| 298 LCodeGen* codegen_; | 299 LCodeGen* codegen_; |
| 299 Label entry_; | 300 Label entry_; |
| 300 Label exit_; | 301 Label exit_; |
| 301 Label* external_exit_; | 302 Label* external_exit_; |
| 302 }; | 303 }; |
| 303 | 304 |
| 304 } } // namespace v8::internal | 305 } } // namespace v8::internal |
| 305 | 306 |
| 306 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ | 307 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ |
| OLD | NEW |