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

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

Issue 17977002: - Remove arguments definition test from the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 M(Parameter) \ 516 M(Parameter) \
517 M(ParallelMove) \ 517 M(ParallelMove) \
518 M(PushArgument) \ 518 M(PushArgument) \
519 M(Return) \ 519 M(Return) \
520 M(Throw) \ 520 M(Throw) \
521 M(ReThrow) \ 521 M(ReThrow) \
522 M(Goto) \ 522 M(Goto) \
523 M(Branch) \ 523 M(Branch) \
524 M(AssertAssignable) \ 524 M(AssertAssignable) \
525 M(AssertBoolean) \ 525 M(AssertBoolean) \
526 M(ArgumentDefinitionTest) \
527 M(CurrentContext) \ 526 M(CurrentContext) \
528 M(StoreContext) \ 527 M(StoreContext) \
529 M(ClosureCall) \ 528 M(ClosureCall) \
530 M(InstanceCall) \ 529 M(InstanceCall) \
531 M(PolymorphicInstanceCall) \ 530 M(PolymorphicInstanceCall) \
532 M(StaticCall) \ 531 M(StaticCall) \
533 M(LoadLocal) \ 532 M(LoadLocal) \
534 M(PushTemp) \ 533 M(PushTemp) \
535 M(DropTemps) \ 534 M(DropTemps) \
536 M(StoreLocal) \ 535 M(StoreLocal) \
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after
2507 2506
2508 virtual bool MayThrow() const { return true; } 2507 virtual bool MayThrow() const { return true; }
2509 2508
2510 private: 2509 private:
2511 const intptr_t token_pos_; 2510 const intptr_t token_pos_;
2512 2511
2513 DISALLOW_COPY_AND_ASSIGN(AssertBooleanInstr); 2512 DISALLOW_COPY_AND_ASSIGN(AssertBooleanInstr);
2514 }; 2513 };
2515 2514
2516 2515
2517 class ArgumentDefinitionTestInstr : public TemplateDefinition<1> {
2518 public:
2519 ArgumentDefinitionTestInstr(ArgumentDefinitionTestNode* node,
2520 Value* saved_arguments_descriptor)
2521 : ast_node_(*node) {
2522 SetInputAt(0, saved_arguments_descriptor);
2523 }
2524
2525 DECLARE_INSTRUCTION(ArgumentDefinitionTest)
2526 virtual CompileType ComputeType() const;
2527
2528 intptr_t token_pos() const { return ast_node_.token_pos(); }
2529 intptr_t formal_parameter_index() const {
2530 return ast_node_.formal_parameter_index();
2531 }
2532 const String& formal_parameter_name() const {
2533 return ast_node_.formal_parameter_name();
2534 }
2535
2536 Value* saved_arguments_descriptor() const { return inputs_[0]; }
2537
2538 virtual void PrintOperandsTo(BufferFormatter* f) const;
2539
2540 virtual bool CanDeoptimize() const { return true; }
2541
2542 virtual EffectSet Effects() const { return EffectSet::None(); }
2543
2544 virtual bool MayThrow() const { return true; }
2545
2546 private:
2547 const ArgumentDefinitionTestNode& ast_node_;
2548
2549 DISALLOW_COPY_AND_ASSIGN(ArgumentDefinitionTestInstr);
2550 };
2551
2552
2553 // Denotes the current context, normally held in a register. This is 2516 // Denotes the current context, normally held in a register. This is
2554 // a computation, not a value, because it's mutable. 2517 // a computation, not a value, because it's mutable.
2555 class CurrentContextInstr : public TemplateDefinition<0> { 2518 class CurrentContextInstr : public TemplateDefinition<0> {
2556 public: 2519 public:
2557 CurrentContextInstr() { } 2520 CurrentContextInstr() { }
2558 2521
2559 DECLARE_INSTRUCTION(CurrentContext) 2522 DECLARE_INSTRUCTION(CurrentContext)
2560 virtual CompileType ComputeType() const; 2523 virtual CompileType ComputeType() const;
2561 2524
2562 virtual bool CanDeoptimize() const { return false; } 2525 virtual bool CanDeoptimize() const { return false; }
(...skipping 3938 matching lines...) Expand 10 before | Expand all | Expand 10 after
6501 ForwardInstructionIterator* current_iterator_; 6464 ForwardInstructionIterator* current_iterator_;
6502 6465
6503 private: 6466 private:
6504 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6467 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6505 }; 6468 };
6506 6469
6507 6470
6508 } // namespace dart 6471 } // namespace dart
6509 6472
6510 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6473 #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