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
info->zone() here and below
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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 struct JumpTableEntry { | 346 struct JumpTableEntry { |
| 348 explicit inline JumpTableEntry(Address entry) | 347 explicit inline JumpTableEntry(Address entry) |
| 349 : label(), | 348 : label(), |
| 350 address(entry) { } | 349 address(entry) { } |
| 351 Label label; | 350 Label label; |
| 352 Address address; | 351 Address address; |
| 353 }; | 352 }; |
| 354 | 353 |
| 355 void EnsureSpaceForLazyDeopt(); | 354 void EnsureSpaceForLazyDeopt(); |
| 356 | 355 |
| 356 Zone* zone_; | |
| 357 LChunk* const chunk_; | 357 LChunk* const chunk_; |
| 358 MacroAssembler* const masm_; | 358 MacroAssembler* const masm_; |
| 359 CompilationInfo* const info_; | 359 CompilationInfo* const info_; |
| 360 | 360 |
| 361 int current_block_; | 361 int current_block_; |
| 362 int current_instruction_; | 362 int current_instruction_; |
| 363 const ZoneList<LInstruction*>* instructions_; | 363 const ZoneList<LInstruction*>* instructions_; |
| 364 ZoneList<LEnvironment*> deoptimizations_; | 364 ZoneList<LEnvironment*> deoptimizations_; |
| 365 ZoneList<JumpTableEntry> deopt_jump_table_; | 365 ZoneList<JumpTableEntry> deopt_jump_table_; |
| 366 ZoneList<Handle<Object> > deoptimization_literals_; | 366 ZoneList<Handle<Object> > deoptimization_literals_; |
| 367 int inlined_function_count_; | 367 int inlined_function_count_; |
| 368 Scope* const scope_; | 368 Scope* const scope_; |
| 369 Status status_; | 369 Status status_; |
| 370 TranslationBuffer translations_; | 370 TranslationBuffer translations_; |
| 371 ZoneList<LDeferredCode*> deferred_; | 371 ZoneList<LDeferredCode*> deferred_; |
| 372 int osr_pc_offset_; | 372 int osr_pc_offset_; |
| 373 int last_lazy_deopt_pc_; | 373 int last_lazy_deopt_pc_; |
| 374 | 374 |
| 375 // Builder that keeps track of safepoints in the code. The table | 375 // Builder that keeps track of safepoints in the code. The table |
| 376 // itself is emitted at the end of the generated code. | 376 // itself is emitted at the end of the generated code. |
| 377 SafepointTableBuilder safepoints_; | 377 SafepointTableBuilder safepoints_; |
| 378 | 378 |
| 379 Zone* zone_; | |
| 380 | |
| 381 // Compiler from a set of parallel moves to a sequential list of moves. | 379 // Compiler from a set of parallel moves to a sequential list of moves. |
| 382 LGapResolver resolver_; | 380 LGapResolver resolver_; |
| 383 | 381 |
| 384 Safepoint::Kind expected_safepoint_kind_; | 382 Safepoint::Kind expected_safepoint_kind_; |
| 385 | 383 |
| 386 class PushSafepointRegistersScope BASE_EMBEDDED { | 384 class PushSafepointRegistersScope BASE_EMBEDDED { |
| 387 public: | 385 public: |
| 388 PushSafepointRegistersScope(LCodeGen* codegen, | 386 PushSafepointRegistersScope(LCodeGen* codegen, |
| 389 Safepoint::Kind kind) | 387 Safepoint::Kind kind) |
| 390 : codegen_(codegen) { | 388 : codegen_(codegen) { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 456 LCodeGen* codegen_; | 454 LCodeGen* codegen_; |
| 457 Label entry_; | 455 Label entry_; |
| 458 Label exit_; | 456 Label exit_; |
| 459 Label* external_exit_; | 457 Label* external_exit_; |
| 460 int instruction_index_; | 458 int instruction_index_; |
| 461 }; | 459 }; |
| 462 | 460 |
| 463 } } // namespace v8::internal | 461 } } // namespace v8::internal |
| 464 | 462 |
| 465 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ | 463 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ |
| OLD | NEW |