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

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

Issue 2947143002: Revert "VM(RegExp): Allow OSR optimization of RegExp :matcher functions." (Closed)
Patch Set: Created 3 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
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/intermediate_language.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 RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_
6 #define RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ 6 #define RUNTIME_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 7269 matching lines...) Expand 10 before | Expand all | Expand 10 after
7280 7280
7281 private: 7281 private:
7282 const Token::Kind op_kind_; 7282 const Token::Kind op_kind_;
7283 7283
7284 DISALLOW_COPY_AND_ASSIGN(UnaryDoubleOpInstr); 7284 DISALLOW_COPY_AND_ASSIGN(UnaryDoubleOpInstr);
7285 }; 7285 };
7286 7286
7287 7287
7288 class CheckStackOverflowInstr : public TemplateInstruction<0, NoThrow> { 7288 class CheckStackOverflowInstr : public TemplateInstruction<0, NoThrow> {
7289 public: 7289 public:
7290 enum Kind {
7291 // kOsrAndPreemption stack overflow checks are emitted in both unoptimized
7292 // and optimized versions of the code and they serve as both preemption and
7293 // OSR entry points.
7294 kOsrAndPreemption,
7295
7296 // kOsrOnly stack overflow checks are only needed in the unoptimized code
7297 // because we can't OSR optimized code.
7298 kOsrOnly,
7299 };
7300
7301 CheckStackOverflowInstr(TokenPosition token_pos, 7290 CheckStackOverflowInstr(TokenPosition token_pos,
7302 intptr_t loop_depth, 7291 intptr_t loop_depth,
7303 intptr_t deopt_id, 7292 intptr_t deopt_id)
7304 Kind kind = kOsrAndPreemption)
7305 : TemplateInstruction(deopt_id), 7293 : TemplateInstruction(deopt_id),
7306 token_pos_(token_pos), 7294 token_pos_(token_pos),
7307 loop_depth_(loop_depth), 7295 loop_depth_(loop_depth) {}
7308 kind_(kind) {
7309 ASSERT(kind != kOsrOnly || loop_depth > 0);
7310 }
7311 7296
7312 virtual TokenPosition token_pos() const { return token_pos_; } 7297 virtual TokenPosition token_pos() const { return token_pos_; }
7313 bool in_loop() const { return loop_depth_ > 0; } 7298 bool in_loop() const { return loop_depth_ > 0; }
7314 intptr_t loop_depth() const { return loop_depth_; } 7299 intptr_t loop_depth() const { return loop_depth_; }
7315 7300
7316 DECLARE_INSTRUCTION(CheckStackOverflow) 7301 DECLARE_INSTRUCTION(CheckStackOverflow)
7317 7302
7318 virtual bool ComputeCanDeoptimize() const { return true; } 7303 virtual bool ComputeCanDeoptimize() const { return true; }
7319 7304
7320 virtual Instruction* Canonicalize(FlowGraph* flow_graph);
7321
7322 virtual EffectSet Effects() const { return EffectSet::None(); } 7305 virtual EffectSet Effects() const { return EffectSet::None(); }
7323 7306
7324 PRINT_OPERANDS_TO_SUPPORT 7307 PRINT_OPERANDS_TO_SUPPORT
7325 7308
7326 private: 7309 private:
7327 const TokenPosition token_pos_; 7310 const TokenPosition token_pos_;
7328 const intptr_t loop_depth_; 7311 const intptr_t loop_depth_;
7329 const Kind kind_;
7330 7312
7331 DISALLOW_COPY_AND_ASSIGN(CheckStackOverflowInstr); 7313 DISALLOW_COPY_AND_ASSIGN(CheckStackOverflowInstr);
7332 }; 7314 };
7333 7315
7334 7316
7335 // TODO(vegorov): remove this instruction in favor of Int32ToDouble. 7317 // TODO(vegorov): remove this instruction in favor of Int32ToDouble.
7336 class SmiToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> { 7318 class SmiToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
7337 public: 7319 public:
7338 SmiToDoubleInstr(Value* value, TokenPosition token_pos) 7320 SmiToDoubleInstr(Value* value, TokenPosition token_pos)
7339 : token_pos_(token_pos) { 7321 : token_pos_(token_pos) {
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
8274 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8256 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8275 UNIMPLEMENTED(); \ 8257 UNIMPLEMENTED(); \
8276 return NULL; \ 8258 return NULL; \
8277 } \ 8259 } \
8278 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8260 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8279 8261
8280 8262
8281 } // namespace dart 8263 } // namespace dart
8282 8264
8283 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ 8265 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698