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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 17315006: Scale the OSR optimization threshold by loop nesting depth. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 5902 matching lines...) Expand 10 before | Expand all | Expand 10 after
5913 5913
5914 private: 5914 private:
5915 const Token::Kind op_kind_; 5915 const Token::Kind op_kind_;
5916 5916
5917 DISALLOW_COPY_AND_ASSIGN(UnarySmiOpInstr); 5917 DISALLOW_COPY_AND_ASSIGN(UnarySmiOpInstr);
5918 }; 5918 };
5919 5919
5920 5920
5921 class CheckStackOverflowInstr : public TemplateInstruction<0> { 5921 class CheckStackOverflowInstr : public TemplateInstruction<0> {
5922 public: 5922 public:
5923 CheckStackOverflowInstr(intptr_t token_pos, bool in_loop) 5923 CheckStackOverflowInstr(intptr_t token_pos, intptr_t loop_depth)
5924 : token_pos_(token_pos), in_loop_(in_loop) {} 5924 : token_pos_(token_pos), loop_depth_(loop_depth) {}
5925 5925
5926 intptr_t token_pos() const { return token_pos_; } 5926 intptr_t token_pos() const { return token_pos_; }
5927 bool in_loop() const { return in_loop_; } 5927 bool in_loop() const { return loop_depth_ > 0; }
5928 intptr_t loop_depth() const { return loop_depth_; }
5928 5929
5929 DECLARE_INSTRUCTION(CheckStackOverflow) 5930 DECLARE_INSTRUCTION(CheckStackOverflow)
5930 5931
5931 virtual intptr_t ArgumentCount() const { return 0; } 5932 virtual intptr_t ArgumentCount() const { return 0; }
5932 5933
5933 virtual bool CanDeoptimize() const { return true; } 5934 virtual bool CanDeoptimize() const { return true; }
5934 5935
5935 virtual EffectSet Effects() const { return EffectSet::None(); } 5936 virtual EffectSet Effects() const { return EffectSet::None(); }
5936 5937
5937 virtual bool MayThrow() const { return false; } 5938 virtual bool MayThrow() const { return false; }
5938 5939
5939 virtual void PrintOperandsTo(BufferFormatter* f) const; 5940 virtual void PrintOperandsTo(BufferFormatter* f) const;
5940 5941
5941 private: 5942 private:
5942 const intptr_t token_pos_; 5943 const intptr_t token_pos_;
5943 const bool in_loop_; 5944 const intptr_t loop_depth_;
5944 5945
5945 DISALLOW_COPY_AND_ASSIGN(CheckStackOverflowInstr); 5946 DISALLOW_COPY_AND_ASSIGN(CheckStackOverflowInstr);
5946 }; 5947 };
5947 5948
5948 5949
5949 class SmiToDoubleInstr : public TemplateDefinition<1> { 5950 class SmiToDoubleInstr : public TemplateDefinition<1> {
5950 public: 5951 public:
5951 explicit SmiToDoubleInstr(Value* value) { 5952 explicit SmiToDoubleInstr(Value* value) {
5952 SetInputAt(0, value); 5953 SetInputAt(0, value);
5953 } 5954 }
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
6488 ForwardInstructionIterator* current_iterator_; 6489 ForwardInstructionIterator* current_iterator_;
6489 6490
6490 private: 6491 private:
6491 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6492 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6492 }; 6493 };
6493 6494
6494 6495
6495 } // namespace dart 6496 } // namespace dart
6496 6497
6497 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6498 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698