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

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

Issue 22839003: Polymorphic inlining for some recognized methods in the optimizing compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed modulo performance regression Created 7 years, 4 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 | « no previous file | runtime/vm/code_generator_test.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) 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_AST_H_ 5 #ifndef VM_AST_H_
6 #define VM_AST_H_ 6 #define VM_AST_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 }; 1549 };
1550 1550
1551 1551
1552 // The body of a Dart function marked as 'native' consists of this node. 1552 // The body of a Dart function marked as 'native' consists of this node.
1553 class NativeBodyNode : public AstNode { 1553 class NativeBodyNode : public AstNode {
1554 public: 1554 public:
1555 NativeBodyNode(intptr_t token_pos, 1555 NativeBodyNode(intptr_t token_pos,
1556 const Function& function, 1556 const Function& function,
1557 const String& native_c_function_name, 1557 const String& native_c_function_name,
1558 NativeFunction native_c_function, 1558 NativeFunction native_c_function,
1559 LocalScope* scope,
1559 bool is_bootstrap_native) 1560 bool is_bootstrap_native)
1560 : AstNode(token_pos), 1561 : AstNode(token_pos),
1561 function_(function), 1562 function_(function),
1562 native_c_function_name_(native_c_function_name), 1563 native_c_function_name_(native_c_function_name),
1563 native_c_function_(native_c_function), 1564 native_c_function_(native_c_function),
1565 scope_(scope),
1564 is_bootstrap_native_(is_bootstrap_native) { 1566 is_bootstrap_native_(is_bootstrap_native) {
1565 ASSERT(function_.IsZoneHandle()); 1567 ASSERT(function_.IsZoneHandle());
1566 ASSERT(native_c_function_ != NULL); 1568 ASSERT(native_c_function_ != NULL);
1567 ASSERT(native_c_function_name_.IsZoneHandle()); 1569 ASSERT(native_c_function_name_.IsZoneHandle());
1568 ASSERT(native_c_function_name_.IsSymbol()); 1570 ASSERT(native_c_function_name_.IsSymbol());
1569 } 1571 }
1570 1572
1571 const Function& function() const { return function_; } 1573 const Function& function() const { return function_; }
1572 const String& native_c_function_name() const { 1574 const String& native_c_function_name() const {
1573 return native_c_function_name_; 1575 return native_c_function_name_;
1574 } 1576 }
1575 NativeFunction native_c_function() const { return native_c_function_; } 1577 NativeFunction native_c_function() const { return native_c_function_; }
1578 LocalScope* scope() const { return scope_; }
1576 bool is_bootstrap_native() const { return is_bootstrap_native_; } 1579 bool is_bootstrap_native() const { return is_bootstrap_native_; }
1577 1580
1578 virtual void VisitChildren(AstNodeVisitor* visitor) const { } 1581 virtual void VisitChildren(AstNodeVisitor* visitor) const { }
1579 1582
1580 DECLARE_COMMON_NODE_FUNCTIONS(NativeBodyNode); 1583 DECLARE_COMMON_NODE_FUNCTIONS(NativeBodyNode);
1581 1584
1582 private: 1585 private:
1583 const Function& function_; // Native Dart function. 1586 const Function& function_; // Native Dart function.
1584 const String& native_c_function_name_; 1587 const String& native_c_function_name_;
1585 NativeFunction native_c_function_; // Actual non-Dart implementation. 1588 NativeFunction native_c_function_; // Actual non-Dart implementation.
1589 LocalScope* scope_;
1586 const bool is_bootstrap_native_; // Is a bootstrap native method. 1590 const bool is_bootstrap_native_; // Is a bootstrap native method.
1587 1591
1588 DISALLOW_IMPLICIT_CONSTRUCTORS(NativeBodyNode); 1592 DISALLOW_IMPLICIT_CONSTRUCTORS(NativeBodyNode);
1589 }; 1593 };
1590 1594
1591 1595
1592 class CatchClauseNode : public AstNode { 1596 class CatchClauseNode : public AstNode {
1593 public: 1597 public:
1594 static const int kInvalidTryIndex = -1; 1598 static const int kInvalidTryIndex = -1;
1595 1599
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 const intptr_t try_index_; 1752 const intptr_t try_index_;
1749 1753
1750 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1754 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1751 }; 1755 };
1752 1756
1753 } // namespace dart 1757 } // namespace dart
1754 1758
1755 #undef DECLARE_COMMON_NODE_FUNCTIONS 1759 #undef DECLARE_COMMON_NODE_FUNCTIONS
1756 1760
1757 #endif // VM_AST_H_ 1761 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698