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 27 matching lines...) Expand all Loading... | |
38 | 38 |
39 namespace v8 { | 39 namespace v8 { |
40 namespace internal { | 40 namespace internal { |
41 | 41 |
42 // Forward declarations. | 42 // Forward declarations. |
43 class LDeferredCode; | 43 class LDeferredCode; |
44 class SafepointGenerator; | 44 class SafepointGenerator; |
45 | 45 |
46 class LCodeGen BASE_EMBEDDED { | 46 class LCodeGen BASE_EMBEDDED { |
47 public: | 47 public: |
48 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info, | 48 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) |
49 Zone* zone) | 49 : zone_(info->zone()), |
50 : chunk_(chunk), | 50 chunk_(chunk), |
51 masm_(assembler), | 51 masm_(assembler), |
52 info_(info), | 52 info_(info), |
53 current_block_(-1), | 53 current_block_(-1), |
54 current_instruction_(-1), | 54 current_instruction_(-1), |
55 instructions_(chunk->instructions()), | 55 instructions_(chunk->instructions()), |
56 deoptimizations_(4, zone), | 56 deoptimizations_(4, zone_), |
danno
2012/06/14 14:22:19
info->zone()
sanjoy
2012/06/15 09:24:31
Fixed.
| |
57 jump_table_(4, zone), | 57 jump_table_(4, zone_), |
58 deoptimization_literals_(8, zone), | 58 deoptimization_literals_(8, zone_), |
59 inlined_function_count_(0), | 59 inlined_function_count_(0), |
60 scope_(info->scope()), | 60 scope_(info->scope()), |
61 status_(UNUSED), | 61 status_(UNUSED), |
62 translations_(zone), | 62 translations_(zone_), |
63 deferred_(8, zone), | 63 deferred_(8, zone_), |
64 osr_pc_offset_(-1), | 64 osr_pc_offset_(-1), |
65 last_lazy_deopt_pc_(0), | 65 last_lazy_deopt_pc_(0), |
66 safepoints_(zone), | 66 safepoints_(zone_), |
67 zone_(zone), | |
68 resolver_(this), | 67 resolver_(this), |
69 expected_safepoint_kind_(Safepoint::kSimple) { | 68 expected_safepoint_kind_(Safepoint::kSimple) { |
70 PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 69 PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
71 } | 70 } |
72 | 71 |
73 // Simple accessors. | 72 // Simple accessors. |
74 MacroAssembler* masm() const { return masm_; } | 73 MacroAssembler* masm() const { return masm_; } |
75 CompilationInfo* info() const { return info_; } | 74 CompilationInfo* info() const { return info_; } |
76 Isolate* isolate() const { return info_->isolate(); } | 75 Isolate* isolate() const { return info_->isolate(); } |
77 Factory* factory() const { return isolate()->factory(); } | 76 Factory* factory() const { return isolate()->factory(); } |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
318 struct JumpTableEntry { | 317 struct JumpTableEntry { |
319 explicit inline JumpTableEntry(Address entry) | 318 explicit inline JumpTableEntry(Address entry) |
320 : label(), | 319 : label(), |
321 address(entry) { } | 320 address(entry) { } |
322 Label label; | 321 Label label; |
323 Address address; | 322 Address address; |
324 }; | 323 }; |
325 | 324 |
326 void EnsureSpaceForLazyDeopt(int space_needed); | 325 void EnsureSpaceForLazyDeopt(int space_needed); |
327 | 326 |
327 Zone* zone_; | |
328 LChunk* const chunk_; | 328 LChunk* const chunk_; |
329 MacroAssembler* const masm_; | 329 MacroAssembler* const masm_; |
330 CompilationInfo* const info_; | 330 CompilationInfo* const info_; |
331 | 331 |
332 int current_block_; | 332 int current_block_; |
333 int current_instruction_; | 333 int current_instruction_; |
334 const ZoneList<LInstruction*>* instructions_; | 334 const ZoneList<LInstruction*>* instructions_; |
335 ZoneList<LEnvironment*> deoptimizations_; | 335 ZoneList<LEnvironment*> deoptimizations_; |
336 ZoneList<JumpTableEntry> jump_table_; | 336 ZoneList<JumpTableEntry> jump_table_; |
337 ZoneList<Handle<Object> > deoptimization_literals_; | 337 ZoneList<Handle<Object> > deoptimization_literals_; |
338 int inlined_function_count_; | 338 int inlined_function_count_; |
339 Scope* const scope_; | 339 Scope* const scope_; |
340 Status status_; | 340 Status status_; |
341 TranslationBuffer translations_; | 341 TranslationBuffer translations_; |
342 ZoneList<LDeferredCode*> deferred_; | 342 ZoneList<LDeferredCode*> deferred_; |
343 int osr_pc_offset_; | 343 int osr_pc_offset_; |
344 int last_lazy_deopt_pc_; | 344 int last_lazy_deopt_pc_; |
345 | 345 |
346 // Builder that keeps track of safepoints in the code. The table | 346 // Builder that keeps track of safepoints in the code. The table |
347 // itself is emitted at the end of the generated code. | 347 // itself is emitted at the end of the generated code. |
348 SafepointTableBuilder safepoints_; | 348 SafepointTableBuilder safepoints_; |
349 | 349 |
350 Zone* zone_; | |
351 | |
352 // Compiler from a set of parallel moves to a sequential list of moves. | 350 // Compiler from a set of parallel moves to a sequential list of moves. |
353 LGapResolver resolver_; | 351 LGapResolver resolver_; |
354 | 352 |
355 Safepoint::Kind expected_safepoint_kind_; | 353 Safepoint::Kind expected_safepoint_kind_; |
356 | 354 |
357 class PushSafepointRegistersScope BASE_EMBEDDED { | 355 class PushSafepointRegistersScope BASE_EMBEDDED { |
358 public: | 356 public: |
359 explicit PushSafepointRegistersScope(LCodeGen* codegen) | 357 explicit PushSafepointRegistersScope(LCodeGen* codegen) |
360 : codegen_(codegen) { | 358 : codegen_(codegen) { |
361 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); | 359 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
406 LCodeGen* codegen_; | 404 LCodeGen* codegen_; |
407 Label entry_; | 405 Label entry_; |
408 Label exit_; | 406 Label exit_; |
409 Label* external_exit_; | 407 Label* external_exit_; |
410 int instruction_index_; | 408 int instruction_index_; |
411 }; | 409 }; |
412 | 410 |
413 } } // namespace v8::internal | 411 } } // namespace v8::internal |
414 | 412 |
415 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ | 413 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ |
OLD | NEW |