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

Side by Side Diff: src/lithium.h

Issue 7374002: Refactor allocation policies. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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/list.h ('k') | src/lithium-allocator.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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 static const int kNumCachedOperands = 16; 380 static const int kNumCachedOperands = 16;
381 static LDoubleRegister cache[]; 381 static LDoubleRegister cache[];
382 382
383 LDoubleRegister() : LOperand() { } 383 LDoubleRegister() : LOperand() { }
384 explicit LDoubleRegister(int index) : LOperand(DOUBLE_REGISTER, index) { } 384 explicit LDoubleRegister(int index) : LOperand(DOUBLE_REGISTER, index) { }
385 }; 385 };
386 386
387 387
388 class LParallelMove : public ZoneObject { 388 class LParallelMove : public ZoneObject {
389 public: 389 public:
390 LParallelMove() : move_operands_(4) { } 390 explicit LParallelMove(Zone* zone) : move_operands_(zone, 4) { }
391 391
392 void AddMove(LOperand* from, LOperand* to) { 392 void AddMove(LOperand* from, LOperand* to) {
393 move_operands_.Add(LMoveOperands(from, to)); 393 move_operands_.Add(LMoveOperands(from, to));
394 } 394 }
395 395
396 bool IsRedundant() const; 396 bool IsRedundant() const;
397 397
398 const ZoneList<LMoveOperands>* move_operands() const { 398 const ZoneList<LMoveOperands>* move_operands() const {
399 return &move_operands_; 399 return &move_operands_;
400 } 400 }
401 401
402 void PrintDataTo(StringStream* stream) const; 402 void PrintDataTo(StringStream* stream) const;
403 403
404 private: 404 private:
405 ZoneList<LMoveOperands> move_operands_; 405 ZoneList<LMoveOperands> move_operands_;
406 }; 406 };
407 407
408 408
409 class LPointerMap: public ZoneObject { 409 class LPointerMap: public ZoneObject {
410 public: 410 public:
411 explicit LPointerMap(int position) 411 LPointerMap(Zone* zone, int position)
412 : pointer_operands_(8), position_(position), lithium_position_(-1) { } 412 : pointer_operands_(zone, 8),
413 position_(position),
414 lithium_position_(-1) { }
413 415
414 const ZoneList<LOperand*>* operands() const { return &pointer_operands_; } 416 const ZoneList<LOperand*>* operands() const { return &pointer_operands_; }
415 int position() const { return position_; } 417 int position() const { return position_; }
416 int lithium_position() const { return lithium_position_; } 418 int lithium_position() const { return lithium_position_; }
417 419
418 void set_lithium_position(int pos) { 420 void set_lithium_position(int pos) {
419 ASSERT(lithium_position_ == -1); 421 ASSERT(lithium_position_ == -1);
420 lithium_position_ = pos; 422 lithium_position_ = pos;
421 } 423 }
422 424
(...skipping 14 matching lines...) Expand all
437 int parameter_count, 439 int parameter_count,
438 int argument_count, 440 int argument_count,
439 int value_count, 441 int value_count,
440 LEnvironment* outer) 442 LEnvironment* outer)
441 : closure_(closure), 443 : closure_(closure),
442 arguments_stack_height_(argument_count), 444 arguments_stack_height_(argument_count),
443 deoptimization_index_(Safepoint::kNoDeoptimizationIndex), 445 deoptimization_index_(Safepoint::kNoDeoptimizationIndex),
444 translation_index_(-1), 446 translation_index_(-1),
445 ast_id_(ast_id), 447 ast_id_(ast_id),
446 parameter_count_(parameter_count), 448 parameter_count_(parameter_count),
447 values_(value_count), 449 values_(closure->GetIsolate()->zone(), value_count),
448 representations_(value_count), 450 representations_(closure->GetIsolate()->zone(), value_count),
449 spilled_registers_(NULL), 451 spilled_registers_(NULL),
450 spilled_double_registers_(NULL), 452 spilled_double_registers_(NULL),
451 outer_(outer) { 453 outer_(outer) {
452 } 454 }
453 455
454 Handle<JSFunction> closure() const { return closure_; } 456 Handle<JSFunction> closure() const { return closure_; }
455 int arguments_stack_height() const { return arguments_stack_height_; } 457 int arguments_stack_height() const { return arguments_stack_height_; }
456 int deoptimization_index() const { return deoptimization_index_; } 458 int deoptimization_index() const { return deoptimization_index_; }
457 int translation_index() const { return translation_index_; } 459 int translation_index() const { return translation_index_; }
458 int ast_id() const { return ast_id_; } 460 int ast_id() const { return ast_id_; }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 ShallowIterator current_iterator_; 587 ShallowIterator current_iterator_;
586 }; 588 };
587 589
588 590
589 int ElementsKindToShiftSize(JSObject::ElementsKind elements_kind); 591 int ElementsKindToShiftSize(JSObject::ElementsKind elements_kind);
590 592
591 593
592 } } // namespace v8::internal 594 } } // namespace v8::internal
593 595
594 #endif // V8_LITHIUM_H_ 596 #endif // V8_LITHIUM_H_
OLDNEW
« no previous file with comments | « src/list.h ('k') | src/lithium-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698