OLD | NEW |
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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 M(IndirectGoto) \ | 447 M(IndirectGoto) \ |
448 M(Branch) \ | 448 M(Branch) \ |
449 M(AssertAssignable) \ | 449 M(AssertAssignable) \ |
450 M(AssertBoolean) \ | 450 M(AssertBoolean) \ |
451 M(CurrentContext) \ | 451 M(CurrentContext) \ |
452 M(ClosureCall) \ | 452 M(ClosureCall) \ |
453 M(InstanceCall) \ | 453 M(InstanceCall) \ |
454 M(PolymorphicInstanceCall) \ | 454 M(PolymorphicInstanceCall) \ |
455 M(StaticCall) \ | 455 M(StaticCall) \ |
456 M(LoadLocal) \ | 456 M(LoadLocal) \ |
457 M(PushTemp) \ | |
458 M(DropTemps) \ | 457 M(DropTemps) \ |
459 M(StoreLocal) \ | 458 M(StoreLocal) \ |
460 M(StrictCompare) \ | 459 M(StrictCompare) \ |
461 M(EqualityCompare) \ | 460 M(EqualityCompare) \ |
462 M(RelationalOp) \ | 461 M(RelationalOp) \ |
463 M(NativeCall) \ | 462 M(NativeCall) \ |
464 M(DebugStepCheck) \ | 463 M(DebugStepCheck) \ |
465 M(LoadIndexed) \ | 464 M(LoadIndexed) \ |
466 M(LoadCodeUnits) \ | 465 M(LoadCodeUnits) \ |
467 M(StoreIndexed) \ | 466 M(StoreIndexed) \ |
(...skipping 2893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3361 | 3360 |
3362 private: | 3361 private: |
3363 const LocalVariable& local_; | 3362 const LocalVariable& local_; |
3364 bool is_last_; | 3363 bool is_last_; |
3365 const TokenPosition token_pos_; | 3364 const TokenPosition token_pos_; |
3366 | 3365 |
3367 DISALLOW_COPY_AND_ASSIGN(LoadLocalInstr); | 3366 DISALLOW_COPY_AND_ASSIGN(LoadLocalInstr); |
3368 }; | 3367 }; |
3369 | 3368 |
3370 | 3369 |
3371 class PushTempInstr : public TemplateDefinition<1, NoThrow> { | |
3372 public: | |
3373 explicit PushTempInstr(Value* value) { | |
3374 SetInputAt(0, value); | |
3375 } | |
3376 | |
3377 DECLARE_INSTRUCTION(PushTemp) | |
3378 | |
3379 Value* value() const { return inputs_[0]; } | |
3380 | |
3381 virtual CompileType ComputeType() const; | |
3382 | |
3383 virtual bool CanDeoptimize() const { return false; } | |
3384 | |
3385 virtual EffectSet Effects() const { | |
3386 UNREACHABLE(); // Eliminated by SSA construction. | |
3387 return EffectSet::None(); | |
3388 } | |
3389 | |
3390 virtual TokenPosition token_pos() const { | |
3391 return TokenPosition::kTempMove; | |
3392 } | |
3393 | |
3394 private: | |
3395 DISALLOW_COPY_AND_ASSIGN(PushTempInstr); | |
3396 }; | |
3397 | |
3398 | |
3399 class DropTempsInstr : public Definition { | 3370 class DropTempsInstr : public Definition { |
3400 public: | 3371 public: |
3401 DropTempsInstr(intptr_t num_temps, Value* value) | 3372 DropTempsInstr(intptr_t num_temps, Value* value) |
3402 : num_temps_(num_temps), value_(NULL) { | 3373 : num_temps_(num_temps), value_(NULL) { |
3403 if (value != NULL) { | 3374 if (value != NULL) { |
3404 SetInputAt(0, value); | 3375 SetInputAt(0, value); |
3405 } | 3376 } |
3406 } | 3377 } |
3407 | 3378 |
3408 DECLARE_INSTRUCTION(DropTemps) | 3379 DECLARE_INSTRUCTION(DropTemps) |
(...skipping 4880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8289 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8260 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
8290 UNIMPLEMENTED(); \ | 8261 UNIMPLEMENTED(); \ |
8291 return NULL; \ | 8262 return NULL; \ |
8292 } \ | 8263 } \ |
8293 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8264 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
8294 | 8265 |
8295 | 8266 |
8296 } // namespace dart | 8267 } // namespace dart |
8297 | 8268 |
8298 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8269 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |