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

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

Issue 10534006: Remove TLS access for current Zone. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review. Created 8 years, 6 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/full-codegen-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 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 class LCodeGen BASE_EMBEDDED { 47 class LCodeGen BASE_EMBEDDED {
48 public: 48 public:
49 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info, 49 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info,
50 Zone* zone) 50 Zone* zone)
51 : chunk_(chunk), 51 : chunk_(chunk),
52 masm_(assembler), 52 masm_(assembler),
53 info_(info), 53 info_(info),
54 current_block_(-1), 54 current_block_(-1),
55 current_instruction_(-1), 55 current_instruction_(-1),
56 instructions_(chunk->instructions()), 56 instructions_(chunk->instructions()),
57 deoptimizations_(4), 57 deoptimizations_(4, zone),
58 deoptimization_literals_(8), 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), 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),
67 resolver_(this), 68 resolver_(this),
68 expected_safepoint_kind_(Safepoint::kSimple), 69 expected_safepoint_kind_(Safepoint::kSimple) {
69 zone_(zone) {
70 PopulateDeoptimizationLiteralsWithInlinedFunctions(); 70 PopulateDeoptimizationLiteralsWithInlinedFunctions();
71 } 71 }
72 72
73 // Simple accessors. 73 // Simple accessors.
74 MacroAssembler* masm() const { return masm_; } 74 MacroAssembler* masm() const { return masm_; }
75 CompilationInfo* info() const { return info_; } 75 CompilationInfo* info() const { return info_; }
76 Isolate* isolate() const { return info_->isolate(); } 76 Isolate* isolate() const { return info_->isolate(); }
77 Factory* factory() const { return isolate()->factory(); } 77 Factory* factory() const { return isolate()->factory(); }
78 Heap* heap() const { return isolate()->heap(); } 78 Heap* heap() const { return isolate()->heap(); }
79 Zone* zone() const { return zone_; } 79 Zone* zone() const { return zone_; }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 Register input, 162 Register input,
163 Register temporary, 163 Register temporary,
164 Register temporary2); 164 Register temporary2);
165 165
166 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } 166 int GetStackSlotCount() const { return chunk()->spill_slot_count(); }
167 int GetParameterCount() const { return scope()->num_parameters(); } 167 int GetParameterCount() const { return scope()->num_parameters(); }
168 168
169 void Abort(const char* format, ...); 169 void Abort(const char* format, ...);
170 void Comment(const char* format, ...); 170 void Comment(const char* format, ...);
171 171
172 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code); } 172 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); }
173 173
174 // Code generation passes. Returns true if code generation should 174 // Code generation passes. Returns true if code generation should
175 // continue. 175 // continue.
176 bool GeneratePrologue(); 176 bool GeneratePrologue();
177 bool GenerateBody(); 177 bool GenerateBody();
178 bool GenerateDeferredCode(); 178 bool GenerateDeferredCode();
179 // Pad the reloc info to ensure that we have enough space to patch during 179 // Pad the reloc info to ensure that we have enough space to patch during
180 // deoptimization. 180 // deoptimization.
181 bool GenerateRelocPadding(); 181 bool GenerateRelocPadding();
182 bool GenerateSafepointTable(); 182 bool GenerateSafepointTable();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 Status status_; 342 Status status_;
343 TranslationBuffer translations_; 343 TranslationBuffer translations_;
344 ZoneList<LDeferredCode*> deferred_; 344 ZoneList<LDeferredCode*> deferred_;
345 int osr_pc_offset_; 345 int osr_pc_offset_;
346 int last_lazy_deopt_pc_; 346 int last_lazy_deopt_pc_;
347 347
348 // Builder that keeps track of safepoints in the code. The table 348 // Builder that keeps track of safepoints in the code. The table
349 // itself is emitted at the end of the generated code. 349 // itself is emitted at the end of the generated code.
350 SafepointTableBuilder safepoints_; 350 SafepointTableBuilder safepoints_;
351 351
352 Zone* zone_;
353
352 // Compiler from a set of parallel moves to a sequential list of moves. 354 // Compiler from a set of parallel moves to a sequential list of moves.
353 LGapResolver resolver_; 355 LGapResolver resolver_;
354 356
355 Safepoint::Kind expected_safepoint_kind_; 357 Safepoint::Kind expected_safepoint_kind_;
356 358
357 Zone* zone_;
358
359 class PushSafepointRegistersScope BASE_EMBEDDED { 359 class PushSafepointRegistersScope BASE_EMBEDDED {
360 public: 360 public:
361 explicit PushSafepointRegistersScope(LCodeGen* codegen) 361 explicit PushSafepointRegistersScope(LCodeGen* codegen)
362 : codegen_(codegen) { 362 : codegen_(codegen) {
363 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); 363 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple);
364 codegen_->masm_->PushSafepointRegisters(); 364 codegen_->masm_->PushSafepointRegisters();
365 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; 365 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters;
366 } 366 }
367 367
368 ~PushSafepointRegistersScope() { 368 ~PushSafepointRegistersScope() {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 LCodeGen* codegen_; 408 LCodeGen* codegen_;
409 Label entry_; 409 Label entry_;
410 Label exit_; 410 Label exit_;
411 Label* external_exit_; 411 Label* external_exit_;
412 int instruction_index_; 412 int instruction_index_;
413 }; 413 };
414 414
415 } } // namespace v8::internal 415 } } // namespace v8::internal
416 416
417 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ 417 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698