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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 CompilationInfo* info() const { return info_; } | 70 CompilationInfo* info() const { return info_; } |
71 Isolate* isolate() const { return info_->isolate(); } | 71 Isolate* isolate() const { return info_->isolate(); } |
72 Factory* factory() const { return isolate()->factory(); } | 72 Factory* factory() const { return isolate()->factory(); } |
73 Heap* heap() const { return isolate()->heap(); } | 73 Heap* heap() const { return isolate()->heap(); } |
74 | 74 |
75 // Support for converting LOperands to assembler types. | 75 // Support for converting LOperands to assembler types. |
76 Register ToRegister(LOperand* op) const; | 76 Register ToRegister(LOperand* op) const; |
77 XMMRegister ToDoubleRegister(LOperand* op) const; | 77 XMMRegister ToDoubleRegister(LOperand* op) const; |
78 bool IsInteger32Constant(LConstantOperand* op) const; | 78 bool IsInteger32Constant(LConstantOperand* op) const; |
79 int ToInteger32(LConstantOperand* op) const; | 79 int ToInteger32(LConstantOperand* op) const; |
| 80 double ToDouble(LConstantOperand* op) const; |
80 bool IsTaggedConstant(LConstantOperand* op) const; | 81 bool IsTaggedConstant(LConstantOperand* op) const; |
81 Handle<Object> ToHandle(LConstantOperand* op) const; | 82 Handle<Object> ToHandle(LConstantOperand* op) const; |
82 Operand ToOperand(LOperand* op) const; | 83 Operand ToOperand(LOperand* op) const; |
83 | 84 |
84 // Try to generate code for the entire chunk, but it may fail if the | 85 // Try to generate code for the entire chunk, but it may fail if the |
85 // chunk contains constructs we cannot handle. Returns true if the | 86 // chunk contains constructs we cannot handle. Returns true if the |
86 // code generation attempt succeeded. | 87 // code generation attempt succeeded. |
87 bool GenerateCode(); | 88 bool GenerateCode(); |
88 | 89 |
89 // Finish the code by setting stack height, safepoint, and bailout | 90 // Finish the code by setting stack height, safepoint, and bailout |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 int arguments, | 244 int arguments, |
244 int deoptimization_index); | 245 int deoptimization_index); |
245 void RecordPosition(int position); | 246 void RecordPosition(int position); |
246 int LastSafepointEnd() { | 247 int LastSafepointEnd() { |
247 return static_cast<int>(safepoints_.GetPcAfterGap()); | 248 return static_cast<int>(safepoints_.GetPcAfterGap()); |
248 } | 249 } |
249 | 250 |
250 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 251 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
251 void EmitGoto(int block); | 252 void EmitGoto(int block); |
252 void EmitBranch(int left_block, int right_block, Condition cc); | 253 void EmitBranch(int left_block, int right_block, Condition cc); |
253 void EmitCmpI(LOperand* left, LOperand* right); | |
254 void EmitNumberUntagD(Register input, | 254 void EmitNumberUntagD(Register input, |
255 XMMRegister result, | 255 XMMRegister result, |
256 bool deoptimize_on_undefined, | 256 bool deoptimize_on_undefined, |
257 LEnvironment* env); | 257 LEnvironment* env); |
258 | 258 |
259 // Emits optimized code for typeof x == "y". Modifies input register. | 259 // Emits optimized code for typeof x == "y". Modifies input register. |
260 // Returns the condition on which a final split to | 260 // Returns the condition on which a final split to |
261 // true and false label should be made, to optimize fallthrough. | 261 // true and false label should be made, to optimize fallthrough. |
262 Condition EmitTypeofIs(Label* true_label, | 262 Condition EmitTypeofIs(Label* true_label, |
263 Label* false_label, | 263 Label* false_label, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 LCodeGen* codegen_; | 370 LCodeGen* codegen_; |
371 Label entry_; | 371 Label entry_; |
372 Label exit_; | 372 Label exit_; |
373 Label* external_exit_; | 373 Label* external_exit_; |
374 int instruction_index_; | 374 int instruction_index_; |
375 }; | 375 }; |
376 | 376 |
377 } } // namespace v8::internal | 377 } } // namespace v8::internal |
378 | 378 |
379 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ | 379 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ |
OLD | NEW |