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

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

Issue 10443114: Progress towards making Zones independent of Isolates and Threads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits and rebase on current bleeding_edge 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/hydrogen.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 28 matching lines...) Expand all
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 LGapNode; 44 class LGapNode;
45 class SafepointGenerator; 45 class SafepointGenerator;
46 46
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 : chunk_(chunk), 51 : chunk_(chunk),
51 masm_(assembler), 52 masm_(assembler),
52 info_(info), 53 info_(info),
53 current_block_(-1), 54 current_block_(-1),
54 current_instruction_(-1), 55 current_instruction_(-1),
55 instructions_(chunk->instructions()), 56 instructions_(chunk->instructions()),
56 deoptimizations_(4), 57 deoptimizations_(4),
57 deoptimization_literals_(8), 58 deoptimization_literals_(8),
58 inlined_function_count_(0), 59 inlined_function_count_(0),
59 scope_(info->scope()), 60 scope_(info->scope()),
60 status_(UNUSED), 61 status_(UNUSED),
62 translations_(zone),
61 deferred_(8), 63 deferred_(8),
62 osr_pc_offset_(-1), 64 osr_pc_offset_(-1),
63 last_lazy_deopt_pc_(0), 65 last_lazy_deopt_pc_(0),
66 safepoints_(zone),
64 resolver_(this), 67 resolver_(this),
65 expected_safepoint_kind_(Safepoint::kSimple) { 68 expected_safepoint_kind_(Safepoint::kSimple),
69 zone_(zone) {
66 PopulateDeoptimizationLiteralsWithInlinedFunctions(); 70 PopulateDeoptimizationLiteralsWithInlinedFunctions();
67 } 71 }
68 72
69 // Simple accessors. 73 // Simple accessors.
70 MacroAssembler* masm() const { return masm_; } 74 MacroAssembler* masm() const { return masm_; }
71 CompilationInfo* info() const { return info_; } 75 CompilationInfo* info() const { return info_; }
72 Isolate* isolate() const { return info_->isolate(); } 76 Isolate* isolate() const { return info_->isolate(); }
73 Factory* factory() const { return isolate()->factory(); } 77 Factory* factory() const { return isolate()->factory(); }
74 Heap* heap() const { return isolate()->heap(); } 78 Heap* heap() const { return isolate()->heap(); }
79 Zone* zone() const { return zone_; }
75 80
76 // Support for converting LOperands to assembler types. 81 // Support for converting LOperands to assembler types.
77 Operand ToOperand(LOperand* op) const; 82 Operand ToOperand(LOperand* op) const;
78 Register ToRegister(LOperand* op) const; 83 Register ToRegister(LOperand* op) const;
79 XMMRegister ToDoubleRegister(LOperand* op) const; 84 XMMRegister ToDoubleRegister(LOperand* op) const;
80 85
81 bool IsInteger32(LConstantOperand* op) const; 86 bool IsInteger32(LConstantOperand* op) const;
82 Immediate ToInteger32Immediate(LOperand* op) const { 87 Immediate ToInteger32Immediate(LOperand* op) const {
83 return Immediate(ToInteger32(LConstantOperand::cast(op))); 88 return Immediate(ToInteger32(LConstantOperand::cast(op)));
84 } 89 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 347
343 // Builder that keeps track of safepoints in the code. The table 348 // Builder that keeps track of safepoints in the code. The table
344 // itself is emitted at the end of the generated code. 349 // itself is emitted at the end of the generated code.
345 SafepointTableBuilder safepoints_; 350 SafepointTableBuilder safepoints_;
346 351
347 // Compiler from a set of parallel moves to a sequential list of moves. 352 // Compiler from a set of parallel moves to a sequential list of moves.
348 LGapResolver resolver_; 353 LGapResolver resolver_;
349 354
350 Safepoint::Kind expected_safepoint_kind_; 355 Safepoint::Kind expected_safepoint_kind_;
351 356
357 Zone* zone_;
358
352 class PushSafepointRegistersScope BASE_EMBEDDED { 359 class PushSafepointRegistersScope BASE_EMBEDDED {
353 public: 360 public:
354 explicit PushSafepointRegistersScope(LCodeGen* codegen) 361 explicit PushSafepointRegistersScope(LCodeGen* codegen)
355 : codegen_(codegen) { 362 : codegen_(codegen) {
356 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); 363 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple);
357 codegen_->masm_->PushSafepointRegisters(); 364 codegen_->masm_->PushSafepointRegisters();
358 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; 365 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters;
359 } 366 }
360 367
361 ~PushSafepointRegistersScope() { 368 ~PushSafepointRegistersScope() {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 LCodeGen* codegen_; 408 LCodeGen* codegen_;
402 Label entry_; 409 Label entry_;
403 Label exit_; 410 Label exit_;
404 Label* external_exit_; 411 Label* external_exit_;
405 int instruction_index_; 412 int instruction_index_;
406 }; 413 };
407 414
408 } } // namespace v8::internal 415 } } // namespace v8::internal
409 416
410 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ 417 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698