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

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

Issue 2152683003: Revert "VM: Array bounds checks that don't deoptimize for precompiled code." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language_arm.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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 M(MathMinMax) \ 505 M(MathMinMax) \
506 M(Box) \ 506 M(Box) \
507 M(Unbox) \ 507 M(Unbox) \
508 M(BoxInt64) \ 508 M(BoxInt64) \
509 M(UnboxInt64) \ 509 M(UnboxInt64) \
510 M(CaseInsensitiveCompareUC16) \ 510 M(CaseInsensitiveCompareUC16) \
511 M(BinaryMintOp) \ 511 M(BinaryMintOp) \
512 M(ShiftMintOp) \ 512 M(ShiftMintOp) \
513 M(UnaryMintOp) \ 513 M(UnaryMintOp) \
514 M(CheckArrayBound) \ 514 M(CheckArrayBound) \
515 M(GenericCheckBound) \
516 M(Constraint) \ 515 M(Constraint) \
517 M(StringToCharCode) \ 516 M(StringToCharCode) \
518 M(OneByteStringFromCharCode) \ 517 M(OneByteStringFromCharCode) \
519 M(StringInterpolate) \ 518 M(StringInterpolate) \
520 M(InvokeMathCFunction) \ 519 M(InvokeMathCFunction) \
521 M(MergedMath) \ 520 M(MergedMath) \
522 M(GuardFieldClass) \ 521 M(GuardFieldClass) \
523 M(GuardFieldLength) \ 522 M(GuardFieldLength) \
524 M(IfThenElse) \ 523 M(IfThenElse) \
525 M(BinaryFloat32x4Op) \ 524 M(BinaryFloat32x4Op) \
(...skipping 7396 matching lines...) Expand 10 before | Expand all | Expand 10 after
7922 }; 7921 };
7923 7922
7924 private: 7923 private:
7925 bool generalized_; 7924 bool generalized_;
7926 bool licm_hoisted_; 7925 bool licm_hoisted_;
7927 7926
7928 DISALLOW_COPY_AND_ASSIGN(CheckArrayBoundInstr); 7927 DISALLOW_COPY_AND_ASSIGN(CheckArrayBoundInstr);
7929 }; 7928 };
7930 7929
7931 7930
7932 class GenericCheckBoundInstr : public TemplateInstruction<2, Throws, NoCSE> {
7933 public:
7934 GenericCheckBoundInstr(Value* length, Value* index, intptr_t deopt_id)
7935 : TemplateInstruction(deopt_id) {
7936 SetInputAt(kLengthPos, length);
7937 SetInputAt(kIndexPos, index);
7938 }
7939
7940 Value* length() const { return inputs_[kLengthPos]; }
7941 Value* index() const { return inputs_[kIndexPos]; }
7942
7943 virtual EffectSet Effects() const { return EffectSet::None(); }
7944 virtual EffectSet Dependencies() const { return EffectSet::None(); }
7945
7946 DECLARE_INSTRUCTION(GenericCheckBound)
7947
7948 virtual bool CanDeoptimize() const { return true; }
7949
7950 // Give a name to the location/input indices.
7951 enum {
7952 kLengthPos = 0,
7953 kIndexPos = 1
7954 };
7955
7956 private:
7957 DISALLOW_COPY_AND_ASSIGN(GenericCheckBoundInstr);
7958 };
7959
7960
7961 class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow> { 7931 class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow> {
7962 public: 7932 public:
7963 UnboxedIntConverterInstr(Representation from, 7933 UnboxedIntConverterInstr(Representation from,
7964 Representation to, 7934 Representation to,
7965 Value* value, 7935 Value* value,
7966 intptr_t deopt_id) 7936 intptr_t deopt_id)
7967 : TemplateDefinition(deopt_id), 7937 : TemplateDefinition(deopt_id),
7968 from_representation_(from), 7938 from_representation_(from),
7969 to_representation_(to), 7939 to_representation_(to),
7970 is_truncating_(to == kUnboxedUint32) { 7940 is_truncating_(to == kUnboxedUint32) {
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
8313 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8283 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8314 UNIMPLEMENTED(); \ 8284 UNIMPLEMENTED(); \
8315 return NULL; \ 8285 return NULL; \
8316 } \ 8286 } \
8317 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8287 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8318 8288
8319 8289
8320 } // namespace dart 8290 } // namespace dart
8321 8291
8322 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8292 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698