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

Side by Side Diff: src/lithium.h

Issue 10778029: Allow uint32 value on optimized frames if they are consumed by safe operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: arm and x64 ports Created 8 years, 4 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
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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 : closure_(closure), 464 : closure_(closure),
465 frame_type_(frame_type), 465 frame_type_(frame_type),
466 arguments_stack_height_(argument_count), 466 arguments_stack_height_(argument_count),
467 deoptimization_index_(Safepoint::kNoDeoptimizationIndex), 467 deoptimization_index_(Safepoint::kNoDeoptimizationIndex),
468 translation_index_(-1), 468 translation_index_(-1),
469 ast_id_(ast_id), 469 ast_id_(ast_id),
470 parameter_count_(parameter_count), 470 parameter_count_(parameter_count),
471 pc_offset_(-1), 471 pc_offset_(-1),
472 values_(value_count, zone), 472 values_(value_count, zone),
473 is_tagged_(value_count, zone), 473 is_tagged_(value_count, zone),
474 is_uint32_(value_count, zone),
474 spilled_registers_(NULL), 475 spilled_registers_(NULL),
475 spilled_double_registers_(NULL), 476 spilled_double_registers_(NULL),
476 outer_(outer), 477 outer_(outer),
477 zone_(zone) { } 478 zone_(zone) { }
478 479
479 Handle<JSFunction> closure() const { return closure_; } 480 Handle<JSFunction> closure() const { return closure_; }
480 FrameType frame_type() const { return frame_type_; } 481 FrameType frame_type() const { return frame_type_; }
481 int arguments_stack_height() const { return arguments_stack_height_; } 482 int arguments_stack_height() const { return arguments_stack_height_; }
482 int deoptimization_index() const { return deoptimization_index_; } 483 int deoptimization_index() const { return deoptimization_index_; }
483 int translation_index() const { return translation_index_; } 484 int translation_index() const { return translation_index_; }
484 BailoutId ast_id() const { return ast_id_; } 485 BailoutId ast_id() const { return ast_id_; }
485 int parameter_count() const { return parameter_count_; } 486 int parameter_count() const { return parameter_count_; }
486 int pc_offset() const { return pc_offset_; } 487 int pc_offset() const { return pc_offset_; }
487 LOperand** spilled_registers() const { return spilled_registers_; } 488 LOperand** spilled_registers() const { return spilled_registers_; }
488 LOperand** spilled_double_registers() const { 489 LOperand** spilled_double_registers() const {
489 return spilled_double_registers_; 490 return spilled_double_registers_;
490 } 491 }
491 const ZoneList<LOperand*>* values() const { return &values_; } 492 const ZoneList<LOperand*>* values() const { return &values_; }
492 LEnvironment* outer() const { return outer_; } 493 LEnvironment* outer() const { return outer_; }
493 494
494 void AddValue(LOperand* operand, Representation representation) { 495 void AddValue(LOperand* operand,
496 Representation representation,
497 bool is_uint32) {
495 values_.Add(operand, zone()); 498 values_.Add(operand, zone());
496 if (representation.IsTagged()) { 499 if (representation.IsTagged()) {
500 ASSERT(!is_uint32);
497 is_tagged_.Add(values_.length() - 1); 501 is_tagged_.Add(values_.length() - 1);
498 } 502 }
503
504 if (is_uint32) {
505 is_uint32_.Add(values_.length() - 1);
506 }
499 } 507 }
500 508
501 bool HasTaggedValueAt(int index) const { 509 bool HasTaggedValueAt(int index) const {
502 return is_tagged_.Contains(index); 510 return is_tagged_.Contains(index);
503 } 511 }
504 512
513 bool HasUint32ValueAt(int index) const {
514 return is_uint32_.Contains(index);
515 }
516
505 void Register(int deoptimization_index, 517 void Register(int deoptimization_index,
506 int translation_index, 518 int translation_index,
507 int pc_offset) { 519 int pc_offset) {
508 ASSERT(!HasBeenRegistered()); 520 ASSERT(!HasBeenRegistered());
509 deoptimization_index_ = deoptimization_index; 521 deoptimization_index_ = deoptimization_index;
510 translation_index_ = translation_index; 522 translation_index_ = translation_index;
511 pc_offset_ = pc_offset; 523 pc_offset_ = pc_offset;
512 } 524 }
513 bool HasBeenRegistered() const { 525 bool HasBeenRegistered() const {
514 return deoptimization_index_ != Safepoint::kNoDeoptimizationIndex; 526 return deoptimization_index_ != Safepoint::kNoDeoptimizationIndex;
(...skipping 13 matching lines...) Expand all
528 Handle<JSFunction> closure_; 540 Handle<JSFunction> closure_;
529 FrameType frame_type_; 541 FrameType frame_type_;
530 int arguments_stack_height_; 542 int arguments_stack_height_;
531 int deoptimization_index_; 543 int deoptimization_index_;
532 int translation_index_; 544 int translation_index_;
533 BailoutId ast_id_; 545 BailoutId ast_id_;
534 int parameter_count_; 546 int parameter_count_;
535 int pc_offset_; 547 int pc_offset_;
536 ZoneList<LOperand*> values_; 548 ZoneList<LOperand*> values_;
537 BitVector is_tagged_; 549 BitVector is_tagged_;
550 BitVector is_uint32_;
538 551
539 // Allocation index indexed arrays of spill slot operands for registers 552 // Allocation index indexed arrays of spill slot operands for registers
540 // that are also in spill slots at an OSR entry. NULL for environments 553 // that are also in spill slots at an OSR entry. NULL for environments
541 // that do not correspond to an OSR entry. 554 // that do not correspond to an OSR entry.
542 LOperand** spilled_registers_; 555 LOperand** spilled_registers_;
543 LOperand** spilled_double_registers_; 556 LOperand** spilled_double_registers_;
544 557
545 LEnvironment* outer_; 558 LEnvironment* outer_;
546 559
547 Zone* zone_; 560 Zone* zone_;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 ZoneList<Handle<JSFunction> > inlined_closures_; 697 ZoneList<Handle<JSFunction> > inlined_closures_;
685 }; 698 };
686 699
687 700
688 int ElementsKindToShiftSize(ElementsKind elements_kind); 701 int ElementsKindToShiftSize(ElementsKind elements_kind);
689 702
690 703
691 } } // namespace v8::internal 704 } } // namespace v8::internal
692 705
693 #endif // V8_LITHIUM_H_ 706 #endif // V8_LITHIUM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698