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

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

Issue 1756403002: VM: Add smi fast path operations for precompiled code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 4 years, 9 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/il_printer.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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 M(AllocateObject) \ 472 M(AllocateObject) \
473 M(LoadField) \ 473 M(LoadField) \
474 M(LoadUntagged) \ 474 M(LoadUntagged) \
475 M(LoadClassId) \ 475 M(LoadClassId) \
476 M(InstantiateType) \ 476 M(InstantiateType) \
477 M(InstantiateTypeArguments) \ 477 M(InstantiateTypeArguments) \
478 M(AllocateContext) \ 478 M(AllocateContext) \
479 M(AllocateUninitializedContext) \ 479 M(AllocateUninitializedContext) \
480 M(CloneContext) \ 480 M(CloneContext) \
481 M(BinarySmiOp) \ 481 M(BinarySmiOp) \
482 M(CheckedSmiOp) \
482 M(BinaryInt32Op) \ 483 M(BinaryInt32Op) \
483 M(UnarySmiOp) \ 484 M(UnarySmiOp) \
484 M(UnaryDoubleOp) \ 485 M(UnaryDoubleOp) \
485 M(CheckStackOverflow) \ 486 M(CheckStackOverflow) \
486 M(SmiToDouble) \ 487 M(SmiToDouble) \
487 M(Int32ToDouble) \ 488 M(Int32ToDouble) \
488 M(MintToDouble) \ 489 M(MintToDouble) \
489 M(DoubleToInteger) \ 490 M(DoubleToInteger) \
490 M(DoubleToSmi) \ 491 M(DoubleToSmi) \
491 M(DoubleToDouble) \ 492 M(DoubleToDouble) \
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
2060 DECLARE_INSTRUCTION(PushArgument) 2061 DECLARE_INSTRUCTION(PushArgument)
2061 2062
2062 virtual CompileType ComputeType() const; 2063 virtual CompileType ComputeType() const;
2063 2064
2064 Value* value() const { return InputAt(0); } 2065 Value* value() const { return InputAt(0); }
2065 2066
2066 virtual bool CanDeoptimize() const { return false; } 2067 virtual bool CanDeoptimize() const { return false; }
2067 2068
2068 virtual EffectSet Effects() const { return EffectSet::None(); } 2069 virtual EffectSet Effects() const { return EffectSet::None(); }
2069 2070
2070
2071 virtual TokenPosition token_pos() const { 2071 virtual TokenPosition token_pos() const {
2072 return TokenPosition::kPushArgument; 2072 return TokenPosition::kPushArgument;
2073 } 2073 }
2074 2074
2075 PRINT_OPERANDS_TO_SUPPORT 2075 PRINT_OPERANDS_TO_SUPPORT
2076 2076
2077 private: 2077 private:
2078 DISALLOW_COPY_AND_ASSIGN(PushArgumentInstr); 2078 DISALLOW_COPY_AND_ASSIGN(PushArgumentInstr);
2079 }; 2079 };
2080 2080
(...skipping 4780 matching lines...) Expand 10 before | Expand all | Expand 10 after
6861 return kUnboxedMint; 6861 return kUnboxedMint;
6862 } 6862 }
6863 6863
6864 DECLARE_INSTRUCTION(UnaryMintOp) 6864 DECLARE_INSTRUCTION(UnaryMintOp)
6865 6865
6866 private: 6866 private:
6867 DISALLOW_COPY_AND_ASSIGN(UnaryMintOpInstr); 6867 DISALLOW_COPY_AND_ASSIGN(UnaryMintOpInstr);
6868 }; 6868 };
6869 6869
6870 6870
6871 class CheckedSmiOpInstr : public TemplateDefinition<2, Throws> {
6872 public:
6873 CheckedSmiOpInstr(Token::Kind op_kind,
6874 Value* left,
6875 Value* right,
6876 InstanceCallInstr* call)
6877 : TemplateDefinition(call->deopt_id()),
6878 call_(call),
6879 op_kind_(op_kind) {
6880 SetInputAt(0, left);
6881 SetInputAt(1, right);
6882 }
6883
6884 InstanceCallInstr* call() const { return call_; }
6885 Token::Kind op_kind() const { return op_kind_; }
6886 Value* left() const { return inputs_[0]; }
6887 Value* right() const { return inputs_[1]; }
6888
6889 virtual bool CanDeoptimize() const { return true; }
6890
6891 virtual EffectSet Effects() const { return EffectSet::All(); }
6892
6893 PRINT_OPERANDS_TO_SUPPORT
6894
6895 DECLARE_INSTRUCTION(CheckedSmiOp)
6896
6897 private:
6898 InstanceCallInstr* call_;
6899 const Token::Kind op_kind_;
6900 DISALLOW_COPY_AND_ASSIGN(CheckedSmiOpInstr);
6901 };
6902
6903
6871 class BinaryIntegerOpInstr : public TemplateDefinition<2, NoThrow, Pure> { 6904 class BinaryIntegerOpInstr : public TemplateDefinition<2, NoThrow, Pure> {
6872 public: 6905 public:
6873 BinaryIntegerOpInstr(Token::Kind op_kind, 6906 BinaryIntegerOpInstr(Token::Kind op_kind,
6874 Value* left, 6907 Value* left,
6875 Value* right, 6908 Value* right,
6876 intptr_t deopt_id) 6909 intptr_t deopt_id)
6877 : TemplateDefinition(deopt_id), 6910 : TemplateDefinition(deopt_id),
6878 op_kind_(op_kind), 6911 op_kind_(op_kind),
6879 can_overflow_(true), 6912 can_overflow_(true),
6880 is_truncating_(false) { 6913 is_truncating_(false) {
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
8227 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8260 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8228 UNIMPLEMENTED(); \ 8261 UNIMPLEMENTED(); \
8229 return NULL; \ 8262 return NULL; \
8230 } \ 8263 } \
8231 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8264 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8232 8265
8233 8266
8234 } // namespace dart 8267 } // namespace dart
8235 8268
8236 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8269 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698