| OLD | NEW |
| 1 // Copyright 2010 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 35 #include "safepoint-table.h" | 35 #include "safepoint-table.h" |
| 36 #include "scopes.h" | 36 #include "scopes.h" |
| 37 | 37 |
| 38 namespace v8 { | 38 namespace v8 { |
| 39 namespace internal { | 39 namespace internal { |
| 40 | 40 |
| 41 // Forward declarations. | 41 // Forward declarations. |
| 42 class LDeferredCode; | 42 class LDeferredCode; |
| 43 class SafepointGenerator; | 43 class SafepointGenerator; |
| 44 | 44 |
| 45 | |
| 46 class LCodeGen BASE_EMBEDDED { | 45 class LCodeGen BASE_EMBEDDED { |
| 47 public: | 46 public: |
| 48 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) | 47 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) |
| 49 : chunk_(chunk), | 48 : chunk_(chunk), |
| 50 masm_(assembler), | 49 masm_(assembler), |
| 51 info_(info), | 50 info_(info), |
| 52 current_block_(-1), | 51 current_block_(-1), |
| 53 current_instruction_(-1), | 52 current_instruction_(-1), |
| 54 instructions_(chunk->instructions()), | 53 instructions_(chunk->instructions()), |
| 55 deoptimizations_(4), | 54 deoptimizations_(4), |
| (...skipping 14 matching lines...) Expand all Loading... |
| 70 // Finish the code by setting stack height, safepoint, and bailout | 69 // Finish the code by setting stack height, safepoint, and bailout |
| 71 // information on it. | 70 // information on it. |
| 72 void FinishCode(Handle<Code> code); | 71 void FinishCode(Handle<Code> code); |
| 73 | 72 |
| 74 // Deferred code support. | 73 // Deferred code support. |
| 75 void DoDeferredNumberTagD(LNumberTagD* instr); | 74 void DoDeferredNumberTagD(LNumberTagD* instr); |
| 76 void DoDeferredNumberTagI(LNumberTagI* instr); | 75 void DoDeferredNumberTagI(LNumberTagI* instr); |
| 77 void DoDeferredTaggedToI(LTaggedToI* instr); | 76 void DoDeferredTaggedToI(LTaggedToI* instr); |
| 78 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); | 77 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); |
| 79 void DoDeferredStackCheck(LGoto* instr); | 78 void DoDeferredStackCheck(LGoto* instr); |
| 79 void DoDeferredLInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, |
| 80 Label* map_check); |
| 80 | 81 |
| 81 // Parallel move support. | 82 // Parallel move support. |
| 82 void DoParallelMove(LParallelMove* move); | 83 void DoParallelMove(LParallelMove* move); |
| 83 | 84 |
| 85 // Emit frame translation commands for an environment. |
| 86 void WriteTranslation(LEnvironment* environment, Translation* translation); |
| 87 |
| 84 // Declare methods that deal with the individual node types. | 88 // Declare methods that deal with the individual node types. |
| 85 #define DECLARE_DO(type) void Do##type(L##type* node); | 89 #define DECLARE_DO(type) void Do##type(L##type* node); |
| 86 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 90 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 87 #undef DECLARE_DO | 91 #undef DECLARE_DO |
| 88 | 92 |
| 89 private: | 93 private: |
| 90 enum Status { | 94 enum Status { |
| 91 UNUSED, | 95 UNUSED, |
| 92 GENERATING, | 96 GENERATING, |
| 93 DONE, | 97 DONE, |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 Scope* const scope_; | 225 Scope* const scope_; |
| 222 Status status_; | 226 Status status_; |
| 223 TranslationBuffer translations_; | 227 TranslationBuffer translations_; |
| 224 ZoneList<LDeferredCode*> deferred_; | 228 ZoneList<LDeferredCode*> deferred_; |
| 225 int osr_pc_offset_; | 229 int osr_pc_offset_; |
| 226 | 230 |
| 227 // Builder that keeps track of safepoints in the code. The table | 231 // Builder that keeps track of safepoints in the code. The table |
| 228 // itself is emitted at the end of the generated code. | 232 // itself is emitted at the end of the generated code. |
| 229 SafepointTableBuilder safepoints_; | 233 SafepointTableBuilder safepoints_; |
| 230 | 234 |
| 235 // Compiler from a set of parallel moves to a sequential list of moves. |
| 236 LGapResolver resolver_; |
| 237 |
| 231 friend class LDeferredCode; | 238 friend class LDeferredCode; |
| 232 friend class LEnvironment; | 239 friend class LEnvironment; |
| 233 friend class SafepointGenerator; | 240 friend class SafepointGenerator; |
| 234 DISALLOW_COPY_AND_ASSIGN(LCodeGen); | 241 DISALLOW_COPY_AND_ASSIGN(LCodeGen); |
| 235 }; | 242 }; |
| 236 | 243 |
| 237 | 244 |
| 238 class LDeferredCode: public ZoneObject { | 245 class LDeferredCode: public ZoneObject { |
| 239 public: | 246 public: |
| 240 explicit LDeferredCode(LCodeGen* codegen) | 247 explicit LDeferredCode(LCodeGen* codegen) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 256 private: | 263 private: |
| 257 LCodeGen* codegen_; | 264 LCodeGen* codegen_; |
| 258 Label entry_; | 265 Label entry_; |
| 259 Label exit_; | 266 Label exit_; |
| 260 Label* external_exit_; | 267 Label* external_exit_; |
| 261 }; | 268 }; |
| 262 | 269 |
| 263 } } // namespace v8::internal | 270 } } // namespace v8::internal |
| 264 | 271 |
| 265 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 272 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
| OLD | NEW |