| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // Deferred code support. | 95 // Deferred code support. |
| 96 void DoDeferredNumberTagD(LNumberTagD* instr); | 96 void DoDeferredNumberTagD(LNumberTagD* instr); |
| 97 void DoDeferredTaggedToI(LTaggedToI* instr); | 97 void DoDeferredTaggedToI(LTaggedToI* instr); |
| 98 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); | 98 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); |
| 99 void DoDeferredStackCheck(LStackCheck* instr); | 99 void DoDeferredStackCheck(LStackCheck* instr); |
| 100 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); | 100 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); |
| 101 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); | 101 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); |
| 102 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, | 102 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, |
| 103 Label* map_check); | 103 Label* map_check); |
| 104 | 104 |
| 105 // Parallel move support. | 105 void DoCheckMapCommon(Register reg, Handle<Map> map, |
| 106 CompareMapMode mode, LEnvironment* env); |
| 107 |
| 108 // Parallel move support. |
| 106 void DoParallelMove(LParallelMove* move); | 109 void DoParallelMove(LParallelMove* move); |
| 107 void DoGap(LGap* instr); | 110 void DoGap(LGap* instr); |
| 108 | 111 |
| 109 // Emit frame translation commands for an environment. | 112 // Emit frame translation commands for an environment. |
| 110 void WriteTranslation(LEnvironment* environment, Translation* translation); | 113 void WriteTranslation(LEnvironment* environment, Translation* translation); |
| 111 | 114 |
| 112 // Declare methods that deal with the individual node types. | 115 // Declare methods that deal with the individual node types. |
| 113 #define DECLARE_DO(type) void Do##type(L##type* node); | 116 #define DECLARE_DO(type) void Do##type(L##type* node); |
| 114 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 117 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 115 #undef DECLARE_DO | 118 #undef DECLARE_DO |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 int arguments, | 248 int arguments, |
| 246 Safepoint::DeoptMode mode); | 249 Safepoint::DeoptMode mode); |
| 247 void RecordPosition(int position); | 250 void RecordPosition(int position); |
| 248 | 251 |
| 249 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 252 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
| 250 void EmitGoto(int block); | 253 void EmitGoto(int block); |
| 251 void EmitBranch(int left_block, int right_block, Condition cc); | 254 void EmitBranch(int left_block, int right_block, Condition cc); |
| 252 void EmitNumberUntagD(Register input, | 255 void EmitNumberUntagD(Register input, |
| 253 XMMRegister result, | 256 XMMRegister result, |
| 254 bool deoptimize_on_undefined, | 257 bool deoptimize_on_undefined, |
| 258 bool deoptimize_on_minus_zero, |
| 255 LEnvironment* env); | 259 LEnvironment* env); |
| 256 | 260 |
| 257 // Emits optimized code for typeof x == "y". Modifies input register. | 261 // Emits optimized code for typeof x == "y". Modifies input register. |
| 258 // Returns the condition on which a final split to | 262 // Returns the condition on which a final split to |
| 259 // true and false label should be made, to optimize fallthrough. | 263 // true and false label should be made, to optimize fallthrough. |
| 260 Condition EmitTypeofIs(Label* true_label, | 264 Condition EmitTypeofIs(Label* true_label, |
| 261 Label* false_label, | 265 Label* false_label, |
| 262 Register input, | 266 Register input, |
| 263 Handle<String> type_name); | 267 Handle<String> type_name); |
| 264 | 268 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 : codegen_(codegen), | 369 : codegen_(codegen), |
| 366 external_exit_(NULL), | 370 external_exit_(NULL), |
| 367 instruction_index_(codegen->current_instruction_) { | 371 instruction_index_(codegen->current_instruction_) { |
| 368 codegen->AddDeferredCode(this); | 372 codegen->AddDeferredCode(this); |
| 369 } | 373 } |
| 370 | 374 |
| 371 virtual ~LDeferredCode() { } | 375 virtual ~LDeferredCode() { } |
| 372 virtual void Generate() = 0; | 376 virtual void Generate() = 0; |
| 373 virtual LInstruction* instr() = 0; | 377 virtual LInstruction* instr() = 0; |
| 374 | 378 |
| 375 void SetExit(Label *exit) { external_exit_ = exit; } | 379 void SetExit(Label* exit) { external_exit_ = exit; } |
| 376 Label* entry() { return &entry_; } | 380 Label* entry() { return &entry_; } |
| 377 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } | 381 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } |
| 378 int instruction_index() const { return instruction_index_; } | 382 int instruction_index() const { return instruction_index_; } |
| 379 | 383 |
| 380 protected: | 384 protected: |
| 381 LCodeGen* codegen() const { return codegen_; } | 385 LCodeGen* codegen() const { return codegen_; } |
| 382 MacroAssembler* masm() const { return codegen_->masm(); } | 386 MacroAssembler* masm() const { return codegen_->masm(); } |
| 383 | 387 |
| 384 private: | 388 private: |
| 385 LCodeGen* codegen_; | 389 LCodeGen* codegen_; |
| 386 Label entry_; | 390 Label entry_; |
| 387 Label exit_; | 391 Label exit_; |
| 388 Label* external_exit_; | 392 Label* external_exit_; |
| 389 int instruction_index_; | 393 int instruction_index_; |
| 390 }; | 394 }; |
| 391 | 395 |
| 392 } } // namespace v8::internal | 396 } } // namespace v8::internal |
| 393 | 397 |
| 394 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ | 398 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ |
| OLD | NEW |