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

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: 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') | runtime/vm/compiler.cc » ('J')
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 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 }; 1511 };
1512 1512
1513 1513
1514 // The body of a Dart function marked as 'native' consists of this node. 1514 // The body of a Dart function marked as 'native' consists of this node.
1515 class NativeBodyNode : public AstNode { 1515 class NativeBodyNode : public AstNode {
1516 public: 1516 public:
1517 NativeBodyNode(intptr_t token_pos, 1517 NativeBodyNode(intptr_t token_pos,
1518 const Function& function, 1518 const Function& function,
1519 const String& native_c_function_name, 1519 const String& native_c_function_name,
1520 NativeFunction native_c_function, 1520 NativeFunction native_c_function,
1521 LocalScope* scope,
1521 bool is_bootstrap_native) 1522 bool is_bootstrap_native)
1522 : AstNode(token_pos), 1523 : AstNode(token_pos),
1523 function_(function), 1524 function_(function),
1524 native_c_function_name_(native_c_function_name), 1525 native_c_function_name_(native_c_function_name),
1525 native_c_function_(native_c_function), 1526 native_c_function_(native_c_function),
1527 scope_(scope),
1526 is_bootstrap_native_(is_bootstrap_native) { 1528 is_bootstrap_native_(is_bootstrap_native) {
1527 ASSERT(function_.IsZoneHandle()); 1529 ASSERT(function_.IsZoneHandle());
1528 ASSERT(native_c_function_ != NULL); 1530 ASSERT(native_c_function_ != NULL);
1529 ASSERT(native_c_function_name_.IsZoneHandle()); 1531 ASSERT(native_c_function_name_.IsZoneHandle());
1530 ASSERT(native_c_function_name_.IsSymbol()); 1532 ASSERT(native_c_function_name_.IsSymbol());
1531 } 1533 }
1532 1534
1533 const Function& function() const { return function_; } 1535 const Function& function() const { return function_; }
1534 const String& native_c_function_name() const { 1536 const String& native_c_function_name() const {
1535 return native_c_function_name_; 1537 return native_c_function_name_;
1536 } 1538 }
1537 NativeFunction native_c_function() const { return native_c_function_; } 1539 NativeFunction native_c_function() const { return native_c_function_; }
1540 LocalScope* scope() const { return scope_; }
1538 bool is_bootstrap_native() const { return is_bootstrap_native_; } 1541 bool is_bootstrap_native() const { return is_bootstrap_native_; }
1539 1542
1540 virtual void VisitChildren(AstNodeVisitor* visitor) const { } 1543 virtual void VisitChildren(AstNodeVisitor* visitor) const { }
1541 1544
1542 DECLARE_COMMON_NODE_FUNCTIONS(NativeBodyNode); 1545 DECLARE_COMMON_NODE_FUNCTIONS(NativeBodyNode);
1543 1546
1544 private: 1547 private:
1545 const Function& function_; // Native Dart function. 1548 const Function& function_; // Native Dart function.
1546 const String& native_c_function_name_; 1549 const String& native_c_function_name_;
1547 NativeFunction native_c_function_; // Actual non-Dart implementation. 1550 NativeFunction native_c_function_; // Actual non-Dart implementation.
1551 LocalScope* scope_;
1548 const bool is_bootstrap_native_; // Is a bootstrap native method. 1552 const bool is_bootstrap_native_; // Is a bootstrap native method.
1549 1553
1550 DISALLOW_IMPLICIT_CONSTRUCTORS(NativeBodyNode); 1554 DISALLOW_IMPLICIT_CONSTRUCTORS(NativeBodyNode);
1551 }; 1555 };
1552 1556
1553 1557
1554 class CatchClauseNode : public AstNode { 1558 class CatchClauseNode : public AstNode {
1555 public: 1559 public:
1556 static const int kInvalidTryIndex = -1; 1560 static const int kInvalidTryIndex = -1;
1557 1561
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 const intptr_t try_index_; 1714 const intptr_t try_index_;
1711 1715
1712 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1716 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1713 }; 1717 };
1714 1718
1715 } // namespace dart 1719 } // namespace dart
1716 1720
1717 #undef DECLARE_COMMON_NODE_FUNCTIONS 1721 #undef DECLARE_COMMON_NODE_FUNCTIONS
1718 1722
1719 #endif // VM_AST_H_ 1723 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator_test.cc » ('j') | runtime/vm/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698