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

Side by Side Diff: src/hydrogen.h

Issue 21340002: Generate a custom OSR entrypoint for OSR compiles on all platforms, and transition to optimized cod… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 int pop_count() const { return pop_count_; } 544 int pop_count() const { return pop_count_; }
545 int push_count() const { return push_count_; } 545 int push_count() const { return push_count_; }
546 546
547 BailoutId ast_id() const { return ast_id_; } 547 BailoutId ast_id() const { return ast_id_; }
548 void set_ast_id(BailoutId id) { ast_id_ = id; } 548 void set_ast_id(BailoutId id) { ast_id_ = id; }
549 549
550 HEnterInlined* entry() const { return entry_; } 550 HEnterInlined* entry() const { return entry_; }
551 void set_entry(HEnterInlined* entry) { entry_ = entry; } 551 void set_entry(HEnterInlined* entry) { entry_ = entry; }
552 552
553 int length() const { return values_.length(); } 553 int length() const { return values_.length(); }
554 bool is_special_index(int i) const {
555 return i >= parameter_count() && i < parameter_count() + specials_count();
556 }
557 554
558 int first_expression_index() const { 555 int first_expression_index() const {
559 return parameter_count() + specials_count() + local_count(); 556 return parameter_count() + specials_count() + local_count();
560 } 557 }
561 558
562 int first_local_index() const { 559 int first_local_index() const {
563 return parameter_count() + specials_count(); 560 return parameter_count() + specials_count();
564 } 561 }
565 562
566 void Bind(Variable* variable, HValue* value) { 563 void Bind(Variable* variable, HValue* value) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 // Stack-allocated local indices are shifted by the number of parameters. 662 // Stack-allocated local indices are shifted by the number of parameters.
666 int IndexFor(Variable* variable) const { 663 int IndexFor(Variable* variable) const {
667 ASSERT(variable->IsStackAllocated()); 664 ASSERT(variable->IsStackAllocated());
668 int shift = variable->IsParameter() 665 int shift = variable->IsParameter()
669 ? 1 666 ? 1
670 : parameter_count_ + specials_count_; 667 : parameter_count_ + specials_count_;
671 return variable->index() + shift; 668 return variable->index() + shift;
672 } 669 }
673 670
674 bool is_local_index(int i) const { 671 bool is_local_index(int i) const {
675 return i >= first_local_index() && 672 return i >= first_local_index() && i < first_expression_index();
676 i < first_expression_index(); 673 }
674
675 bool is_parameter_index(int i) const {
676 return i >= 0 && i < parameter_count();
677 }
678
679 bool is_special_index(int i) const {
680 return i >= parameter_count() && i < parameter_count() + specials_count();
677 } 681 }
678 682
679 void PrintTo(StringStream* stream); 683 void PrintTo(StringStream* stream);
680 void PrintToStd(); 684 void PrintToStd();
681 685
682 Zone* zone() const { return zone_; } 686 Zone* zone() const { return zone_; }
683 687
684 private: 688 private:
685 HEnvironment(const HEnvironment* other, Zone* zone); 689 HEnvironment(const HEnvironment* other, Zone* zone);
686 690
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 EmbeddedVector<char, 64> filename_; 2168 EmbeddedVector<char, 64> filename_;
2165 HeapStringAllocator string_allocator_; 2169 HeapStringAllocator string_allocator_;
2166 StringStream trace_; 2170 StringStream trace_;
2167 int indent_; 2171 int indent_;
2168 }; 2172 };
2169 2173
2170 2174
2171 } } // namespace v8::internal 2175 } } // namespace v8::internal
2172 2176
2173 #endif // V8_HYDROGEN_H_ 2177 #endif // V8_HYDROGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698