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

Side by Side Diff: src/x64/lithium-x64.h

Issue 6142011: Crankshaft: Move LEnvironment and LPointerMap classes to platform-independent... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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/x64/lithium-codegen-x64.cc ('k') | no next file » | 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 20 matching lines...) Expand all
31 #include "hydrogen.h" 31 #include "hydrogen.h"
32 #include "lithium-allocator.h" 32 #include "lithium-allocator.h"
33 #include "lithium.h" 33 #include "lithium.h"
34 #include "safepoint-table.h" 34 #include "safepoint-table.h"
35 35
36 namespace v8 { 36 namespace v8 {
37 namespace internal { 37 namespace internal {
38 38
39 // Forward declarations. 39 // Forward declarations.
40 class LCodeGen; 40 class LCodeGen;
41 class LEnvironment;
42 class Translation;
43 41
44 42
45 // Type hierarchy: 43 // Type hierarchy:
46 // 44 //
47 // LInstruction 45 // LInstruction
48 // LDeoptimize 46 // LDeoptimize
49 // LGap 47 // LGap
50 // LLabel 48 // LLabel
51 // LGoto 49 // LGoto
52 // LLazyBailout 50 // LLazyBailout
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 private: 274 private:
277 // Arrays of spill slot operands for registers with an assigned spill 275 // Arrays of spill slot operands for registers with an assigned spill
278 // slot, i.e., that must also be restored to the spill slot on OSR entry. 276 // slot, i.e., that must also be restored to the spill slot on OSR entry.
279 // NULL if the register has no assigned spill slot. Indexed by allocation 277 // NULL if the register has no assigned spill slot. Indexed by allocation
280 // index. 278 // index.
281 LOperand* register_spills_[Register::kNumAllocatableRegisters]; 279 LOperand* register_spills_[Register::kNumAllocatableRegisters];
282 LOperand* double_register_spills_[DoubleRegister::kNumAllocatableRegisters]; 280 LOperand* double_register_spills_[DoubleRegister::kNumAllocatableRegisters];
283 }; 281 };
284 282
285 283
286 class LPointerMap: public ZoneObject {
287 public:
288 explicit LPointerMap(int position)
289 : pointer_operands_(8), position_(position), lithium_position_(-1) { }
290
291 int lithium_position() const {
292 UNIMPLEMENTED();
293 return 0;
294 }
295
296 void RecordPointer(LOperand* op) { UNIMPLEMENTED(); }
297
298 private:
299 ZoneList<LOperand*> pointer_operands_;
300 int position_;
301 int lithium_position_;
302 };
303
304
305 class LEnvironment: public ZoneObject {
306 public:
307 LEnvironment(Handle<JSFunction> closure,
308 int ast_id,
309 int parameter_count,
310 int argument_count,
311 int value_count,
312 LEnvironment* outer)
313 : closure_(closure),
314 arguments_stack_height_(argument_count),
315 deoptimization_index_(Safepoint::kNoDeoptimizationIndex),
316 translation_index_(-1),
317 ast_id_(ast_id),
318 parameter_count_(parameter_count),
319 values_(value_count),
320 representations_(value_count),
321 spilled_registers_(NULL),
322 spilled_double_registers_(NULL),
323 outer_(outer) {
324 }
325
326 Handle<JSFunction> closure() const { return closure_; }
327 int arguments_stack_height() const { return arguments_stack_height_; }
328 int deoptimization_index() const { return deoptimization_index_; }
329 int translation_index() const { return translation_index_; }
330 int ast_id() const { return ast_id_; }
331 int parameter_count() const { return parameter_count_; }
332 const ZoneList<LOperand*>* values() const { return &values_; }
333 LEnvironment* outer() const { return outer_; }
334
335 private:
336 Handle<JSFunction> closure_;
337 int arguments_stack_height_;
338 int deoptimization_index_;
339 int translation_index_;
340 int ast_id_;
341 int parameter_count_;
342 ZoneList<LOperand*> values_;
343 ZoneList<Representation> representations_;
344
345 // Allocation index indexed arrays of spill slot operands for registers
346 // that are also in spill slots at an OSR entry. NULL for environments
347 // that do not correspond to an OSR entry.
348 LOperand** spilled_registers_;
349 LOperand** spilled_double_registers_;
350
351 LEnvironment* outer_;
352 };
353
354
355 class LChunkBuilder; 284 class LChunkBuilder;
356 class LChunk: public ZoneObject { 285 class LChunk: public ZoneObject {
357 public: 286 public:
358 explicit LChunk(HGraph* graph) 287 explicit LChunk(HGraph* graph)
359 : spill_slot_count_(0), 288 : spill_slot_count_(0),
360 graph_(graph), 289 graph_(graph),
361 instructions_(32), 290 instructions_(32),
362 pointer_maps_(8), 291 pointer_maps_(8),
363 inlined_closures_(1) { } 292 inlined_closures_(1) { }
364 293
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 LInstruction* instructions_pending_deoptimization_environment_; 409 LInstruction* instructions_pending_deoptimization_environment_;
481 int pending_deoptimization_ast_id_; 410 int pending_deoptimization_ast_id_;
482 411
483 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 412 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
484 }; 413 };
485 414
486 415
487 } } // namespace v8::internal 416 } } // namespace v8::internal
488 417
489 #endif // V8_X64_LITHIUM_X64_H_ 418 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698