Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Side by Side Diff: src/ia32/lithium-codegen-ia32.h

Issue 8139027: Version 3.6.5 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 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
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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), 56 deoptimizations_(4),
57 deoptimization_literals_(8), 57 deoptimization_literals_(8),
58 inlined_function_count_(0), 58 inlined_function_count_(0),
59 scope_(info->scope()), 59 scope_(info->scope()),
60 status_(UNUSED), 60 status_(UNUSED),
61 dynamic_frame_alignment_(false),
61 deferred_(8), 62 deferred_(8),
62 osr_pc_offset_(-1), 63 osr_pc_offset_(-1),
63 deoptimization_reloc_size(), 64 deoptimization_reloc_size(),
64 resolver_(this), 65 resolver_(this),
65 expected_safepoint_kind_(Safepoint::kSimple) { 66 expected_safepoint_kind_(Safepoint::kSimple) {
66 PopulateDeoptimizationLiteralsWithInlinedFunctions(); 67 PopulateDeoptimizationLiteralsWithInlinedFunctions();
67 } 68 }
68 69
69 // Simple accessors. 70 // Simple accessors.
70 MacroAssembler* masm() const { return masm_; } 71 MacroAssembler* masm() const { return masm_; }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 }; 127 };
127 128
128 bool is_unused() const { return status_ == UNUSED; } 129 bool is_unused() const { return status_ == UNUSED; }
129 bool is_generating() const { return status_ == GENERATING; } 130 bool is_generating() const { return status_ == GENERATING; }
130 bool is_done() const { return status_ == DONE; } 131 bool is_done() const { return status_ == DONE; }
131 bool is_aborted() const { return status_ == ABORTED; } 132 bool is_aborted() const { return status_ == ABORTED; }
132 133
133 int strict_mode_flag() const { 134 int strict_mode_flag() const {
134 return info()->is_strict_mode() ? kStrictMode : kNonStrictMode; 135 return info()->is_strict_mode() ? kStrictMode : kNonStrictMode;
135 } 136 }
137 bool dynamic_frame_alignment() const { return dynamic_frame_alignment_; }
138 void set_dynamic_frame_alignment(bool value) {
139 dynamic_frame_alignment_ = value;
140 }
136 141
137 LChunk* chunk() const { return chunk_; } 142 LChunk* chunk() const { return chunk_; }
138 Scope* scope() const { return scope_; } 143 Scope* scope() const { return scope_; }
139 HGraph* graph() const { return chunk_->graph(); } 144 HGraph* graph() const { return chunk_->graph(); }
140 145
141 int GetNextEmittedBlock(int block); 146 int GetNextEmittedBlock(int block);
142 LInstruction* GetNextInstruction(); 147 LInstruction* GetNextInstruction();
143 148
144 void EmitClassOfTest(Label* if_true, 149 void EmitClassOfTest(Label* if_true,
145 Label* if_false, 150 Label* if_false,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 CompilationInfo* const info_; 295 CompilationInfo* const info_;
291 296
292 int current_block_; 297 int current_block_;
293 int current_instruction_; 298 int current_instruction_;
294 const ZoneList<LInstruction*>* instructions_; 299 const ZoneList<LInstruction*>* instructions_;
295 ZoneList<LEnvironment*> deoptimizations_; 300 ZoneList<LEnvironment*> deoptimizations_;
296 ZoneList<Handle<Object> > deoptimization_literals_; 301 ZoneList<Handle<Object> > deoptimization_literals_;
297 int inlined_function_count_; 302 int inlined_function_count_;
298 Scope* const scope_; 303 Scope* const scope_;
299 Status status_; 304 Status status_;
305 bool dynamic_frame_alignment_;
300 TranslationBuffer translations_; 306 TranslationBuffer translations_;
301 ZoneList<LDeferredCode*> deferred_; 307 ZoneList<LDeferredCode*> deferred_;
302 int osr_pc_offset_; 308 int osr_pc_offset_;
303 309
304 struct DeoptimizationRelocSize { 310 struct DeoptimizationRelocSize {
305 int min_size; 311 int min_size;
306 int last_pc_offset; 312 int last_pc_offset;
307 }; 313 };
308 314
309 DeoptimizationRelocSize deoptimization_reloc_size; 315 DeoptimizationRelocSize deoptimization_reloc_size;
(...skipping 29 matching lines...) Expand all
339 friend class LDeferredCode; 345 friend class LDeferredCode;
340 friend class LEnvironment; 346 friend class LEnvironment;
341 friend class SafepointGenerator; 347 friend class SafepointGenerator;
342 DISALLOW_COPY_AND_ASSIGN(LCodeGen); 348 DISALLOW_COPY_AND_ASSIGN(LCodeGen);
343 }; 349 };
344 350
345 351
346 class LDeferredCode: public ZoneObject { 352 class LDeferredCode: public ZoneObject {
347 public: 353 public:
348 explicit LDeferredCode(LCodeGen* codegen) 354 explicit LDeferredCode(LCodeGen* codegen)
349 : codegen_(codegen), external_exit_(NULL) { 355 : codegen_(codegen),
356 external_exit_(NULL),
357 instruction_index_(codegen->current_instruction_) {
350 codegen->AddDeferredCode(this); 358 codegen->AddDeferredCode(this);
351 } 359 }
352 360
353 virtual ~LDeferredCode() { } 361 virtual ~LDeferredCode() { }
354 virtual void Generate() = 0; 362 virtual void Generate() = 0;
363 virtual LInstruction* instr() = 0;
355 364
356 void SetExit(Label *exit) { external_exit_ = exit; } 365 void SetExit(Label *exit) { external_exit_ = exit; }
357 Label* entry() { return &entry_; } 366 Label* entry() { return &entry_; }
358 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } 367 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; }
368 int instruction_index() const { return instruction_index_; }
359 369
360 protected: 370 protected:
361 LCodeGen* codegen() const { return codegen_; } 371 LCodeGen* codegen() const { return codegen_; }
362 MacroAssembler* masm() const { return codegen_->masm(); } 372 MacroAssembler* masm() const { return codegen_->masm(); }
363 373
364 private: 374 private:
365 LCodeGen* codegen_; 375 LCodeGen* codegen_;
366 Label entry_; 376 Label entry_;
367 Label exit_; 377 Label exit_;
368 Label* external_exit_; 378 Label* external_exit_;
379 int instruction_index_;
369 }; 380 };
370 381
371 } } // namespace v8::internal 382 } } // namespace v8::internal
372 383
373 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ 384 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698