Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 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 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 | 36 |
| 37 namespace v8 { | 37 namespace v8 { |
| 38 namespace internal { | 38 namespace internal { |
| 39 | 39 |
| 40 // Forward declarations. | 40 // Forward declarations. |
| 41 class LDeferredCode; | 41 class LDeferredCode; |
| 42 class SafepointGenerator; | 42 class SafepointGenerator; |
| 43 | 43 |
| 44 class LCodeGen BASE_EMBEDDED { | 44 class LCodeGen BASE_EMBEDDED { |
| 45 public: | 45 public: |
| 46 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info, | 46 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) |
| 47 Zone* zone) | 47 : zone_(info->zone()), |
| 48 : chunk_(chunk), | 48 chunk_(chunk), |
| 49 masm_(assembler), | 49 masm_(assembler), |
| 50 info_(info), | 50 info_(info), |
| 51 current_block_(-1), | 51 current_block_(-1), |
| 52 current_instruction_(-1), | 52 current_instruction_(-1), |
| 53 instructions_(chunk->instructions()), | 53 instructions_(chunk->instructions()), |
| 54 deoptimizations_(4, zone), | 54 deoptimizations_(4, zone_), |
|
danno
2012/06/14 14:22:19
This is really fragile, since it depends on order
sanjoy
2012/06/15 09:24:31
Done.
| |
| 55 deopt_jump_table_(4, zone), | 55 deopt_jump_table_(4, zone_), |
| 56 deoptimization_literals_(8, zone), | 56 deoptimization_literals_(8, zone_), |
| 57 inlined_function_count_(0), | 57 inlined_function_count_(0), |
| 58 scope_(info->scope()), | 58 scope_(info->scope()), |
| 59 status_(UNUSED), | 59 status_(UNUSED), |
| 60 translations_(zone), | 60 translations_(zone_), |
| 61 deferred_(8, zone), | 61 deferred_(8, zone_), |
| 62 osr_pc_offset_(-1), | 62 osr_pc_offset_(-1), |
| 63 last_lazy_deopt_pc_(0), | 63 last_lazy_deopt_pc_(0), |
| 64 safepoints_(zone), | 64 safepoints_(zone_), |
| 65 zone_(zone), | |
| 66 resolver_(this), | 65 resolver_(this), |
| 67 expected_safepoint_kind_(Safepoint::kSimple) { | 66 expected_safepoint_kind_(Safepoint::kSimple) { |
| 68 PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 67 PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
| 69 } | 68 } |
| 70 | 69 |
| 71 | 70 |
| 72 // Simple accessors. | 71 // Simple accessors. |
| 73 MacroAssembler* masm() const { return masm_; } | 72 MacroAssembler* masm() const { return masm_; } |
| 74 CompilationInfo* info() const { return info_; } | 73 CompilationInfo* info() const { return info_; } |
| 75 Isolate* isolate() const { return info_->isolate(); } | 74 Isolate* isolate() const { return info_->isolate(); } |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 343 struct JumpTableEntry { | 342 struct JumpTableEntry { |
| 344 explicit inline JumpTableEntry(Address entry) | 343 explicit inline JumpTableEntry(Address entry) |
| 345 : label(), | 344 : label(), |
| 346 address(entry) { } | 345 address(entry) { } |
| 347 Label label; | 346 Label label; |
| 348 Address address; | 347 Address address; |
| 349 }; | 348 }; |
| 350 | 349 |
| 351 void EnsureSpaceForLazyDeopt(); | 350 void EnsureSpaceForLazyDeopt(); |
| 352 | 351 |
| 352 Zone* zone_; | |
| 353 LChunk* const chunk_; | 353 LChunk* const chunk_; |
| 354 MacroAssembler* const masm_; | 354 MacroAssembler* const masm_; |
| 355 CompilationInfo* const info_; | 355 CompilationInfo* const info_; |
| 356 | 356 |
| 357 int current_block_; | 357 int current_block_; |
| 358 int current_instruction_; | 358 int current_instruction_; |
| 359 const ZoneList<LInstruction*>* instructions_; | 359 const ZoneList<LInstruction*>* instructions_; |
| 360 ZoneList<LEnvironment*> deoptimizations_; | 360 ZoneList<LEnvironment*> deoptimizations_; |
| 361 ZoneList<JumpTableEntry> deopt_jump_table_; | 361 ZoneList<JumpTableEntry> deopt_jump_table_; |
| 362 ZoneList<Handle<Object> > deoptimization_literals_; | 362 ZoneList<Handle<Object> > deoptimization_literals_; |
| 363 int inlined_function_count_; | 363 int inlined_function_count_; |
| 364 Scope* const scope_; | 364 Scope* const scope_; |
| 365 Status status_; | 365 Status status_; |
| 366 TranslationBuffer translations_; | 366 TranslationBuffer translations_; |
| 367 ZoneList<LDeferredCode*> deferred_; | 367 ZoneList<LDeferredCode*> deferred_; |
| 368 int osr_pc_offset_; | 368 int osr_pc_offset_; |
| 369 int last_lazy_deopt_pc_; | 369 int last_lazy_deopt_pc_; |
| 370 | 370 |
| 371 // Builder that keeps track of safepoints in the code. The table | 371 // Builder that keeps track of safepoints in the code. The table |
| 372 // itself is emitted at the end of the generated code. | 372 // itself is emitted at the end of the generated code. |
| 373 SafepointTableBuilder safepoints_; | 373 SafepointTableBuilder safepoints_; |
| 374 | 374 |
| 375 Zone* zone_; | |
| 376 | |
| 377 // Compiler from a set of parallel moves to a sequential list of moves. | 375 // Compiler from a set of parallel moves to a sequential list of moves. |
| 378 LGapResolver resolver_; | 376 LGapResolver resolver_; |
| 379 | 377 |
| 380 Safepoint::Kind expected_safepoint_kind_; | 378 Safepoint::Kind expected_safepoint_kind_; |
| 381 | 379 |
| 382 class PushSafepointRegistersScope BASE_EMBEDDED { | 380 class PushSafepointRegistersScope BASE_EMBEDDED { |
| 383 public: | 381 public: |
| 384 PushSafepointRegistersScope(LCodeGen* codegen, | 382 PushSafepointRegistersScope(LCodeGen* codegen, |
| 385 Safepoint::Kind kind) | 383 Safepoint::Kind kind) |
| 386 : codegen_(codegen) { | 384 : codegen_(codegen) { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 452 LCodeGen* codegen_; | 450 LCodeGen* codegen_; |
| 453 Label entry_; | 451 Label entry_; |
| 454 Label exit_; | 452 Label exit_; |
| 455 Label* external_exit_; | 453 Label* external_exit_; |
| 456 int instruction_index_; | 454 int instruction_index_; |
| 457 }; | 455 }; |
| 458 | 456 |
| 459 } } // namespace v8::internal | 457 } } // namespace v8::internal |
| 460 | 458 |
| 461 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ | 459 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
| OLD | NEW |