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

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

Issue 10933019: Improve moves of Smi and null objects. Add result cid to List constructor calls. Add tracing of inl… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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/flow_graph_compiler_ia32.cc ('k') | runtime/vm/symbols.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 1979
1980 class StaticCallInstr : public TemplateDefinition<0> { 1980 class StaticCallInstr : public TemplateDefinition<0> {
1981 public: 1981 public:
1982 StaticCallInstr(intptr_t token_pos, 1982 StaticCallInstr(intptr_t token_pos,
1983 const Function& function, 1983 const Function& function,
1984 const Array& argument_names, 1984 const Array& argument_names,
1985 ZoneGrowableArray<PushArgumentInstr*>* arguments) 1985 ZoneGrowableArray<PushArgumentInstr*>* arguments)
1986 : token_pos_(token_pos), 1986 : token_pos_(token_pos),
1987 function_(function), 1987 function_(function),
1988 argument_names_(argument_names), 1988 argument_names_(argument_names),
1989 arguments_(arguments) { 1989 arguments_(arguments),
1990 result_cid_(kDynamicCid) {
1990 ASSERT(function.IsZoneHandle()); 1991 ASSERT(function.IsZoneHandle());
1991 ASSERT(argument_names.IsZoneHandle()); 1992 ASSERT(argument_names.IsZoneHandle());
1992 } 1993 }
1993 1994
1994 DECLARE_INSTRUCTION(StaticCall) 1995 DECLARE_INSTRUCTION(StaticCall)
1995 virtual RawAbstractType* CompileType() const; 1996 virtual RawAbstractType* CompileType() const;
1996 1997
1997 // Accessors forwarded to the AST node. 1998 // Accessors forwarded to the AST node.
1998 const Function& function() const { return function_; } 1999 const Function& function() const { return function_; }
1999 const Array& argument_names() const { return argument_names_; } 2000 const Array& argument_names() const { return argument_names_; }
2000 intptr_t token_pos() const { return token_pos_; } 2001 intptr_t token_pos() const { return token_pos_; }
2001 2002
2002 virtual intptr_t ArgumentCount() const { return arguments_->length(); } 2003 virtual intptr_t ArgumentCount() const { return arguments_->length(); }
2003 PushArgumentInstr* ArgumentAt(intptr_t index) const { 2004 PushArgumentInstr* ArgumentAt(intptr_t index) const {
2004 return (*arguments_)[index]; 2005 return (*arguments_)[index];
2005 } 2006 }
2006 2007
2007 virtual void PrintOperandsTo(BufferFormatter* f) const; 2008 virtual void PrintOperandsTo(BufferFormatter* f) const;
2008 2009
2009 virtual bool CanDeoptimize() const { return true; } 2010 virtual bool CanDeoptimize() const { return true; }
2010 virtual intptr_t ResultCid() const { return kDynamicCid; } 2011 virtual intptr_t ResultCid() const { return result_cid_; }
2012 void set_result_cid(intptr_t value) { result_cid_ = value; }
2011 2013
2012 private: 2014 private:
2013 const intptr_t token_pos_; 2015 const intptr_t token_pos_;
2014 const Function& function_; 2016 const Function& function_;
2015 const Array& argument_names_; 2017 const Array& argument_names_;
2016 ZoneGrowableArray<PushArgumentInstr*>* arguments_; 2018 ZoneGrowableArray<PushArgumentInstr*>* arguments_;
2019 intptr_t result_cid_; // For some library functions we know the result.
2017 2020
2018 DISALLOW_COPY_AND_ASSIGN(StaticCallInstr); 2021 DISALLOW_COPY_AND_ASSIGN(StaticCallInstr);
2019 }; 2022 };
2020 2023
2021 2024
2022 class LoadLocalInstr : public TemplateDefinition<0> { 2025 class LoadLocalInstr : public TemplateDefinition<0> {
2023 public: 2026 public:
2024 LoadLocalInstr(const LocalVariable& local, intptr_t context_level) 2027 LoadLocalInstr(const LocalVariable& local, intptr_t context_level)
2025 : local_(local), 2028 : local_(local),
2026 context_level_(context_level) { } 2029 context_level_(context_level) { }
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
3438 ForwardInstructionIterator* current_iterator_; 3441 ForwardInstructionIterator* current_iterator_;
3439 3442
3440 private: 3443 private:
3441 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 3444 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
3442 }; 3445 };
3443 3446
3444 3447
3445 } // namespace dart 3448 } // namespace dart
3446 3449
3447 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 3450 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698