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

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

Issue 11360116: Pass closure object as first implicit argument to closure functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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_inliner.cc ('k') | runtime/vm/intermediate_language.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_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 2506 matching lines...) Expand 10 before | Expand all | Expand 10 after
2517 class NativeCallInstr : public TemplateDefinition<0> { 2517 class NativeCallInstr : public TemplateDefinition<0> {
2518 public: 2518 public:
2519 explicit NativeCallInstr(NativeBodyNode* node) 2519 explicit NativeCallInstr(NativeBodyNode* node)
2520 : ast_node_(*node) {} 2520 : ast_node_(*node) {}
2521 2521
2522 DECLARE_INSTRUCTION(NativeCall) 2522 DECLARE_INSTRUCTION(NativeCall)
2523 virtual RawAbstractType* CompileType() const; 2523 virtual RawAbstractType* CompileType() const;
2524 2524
2525 intptr_t token_pos() const { return ast_node_.token_pos(); } 2525 intptr_t token_pos() const { return ast_node_.token_pos(); }
2526 2526
2527 const Function& function() const { return ast_node_.function(); }
2528
2527 const String& native_name() const { 2529 const String& native_name() const {
2528 return ast_node_.native_c_function_name(); 2530 return ast_node_.native_c_function_name();
2529 } 2531 }
2530 2532
2531 NativeFunction native_c_function() const { 2533 NativeFunction native_c_function() const {
2532 return ast_node_.native_c_function(); 2534 return ast_node_.native_c_function();
2533 } 2535 }
2534 2536
2535 intptr_t argument_count() const { return ast_node_.argument_count(); }
2536
2537 bool has_optional_parameters() const {
2538 return ast_node_.has_optional_parameters();
2539 }
2540
2541 bool is_native_instance_closure() const {
2542 return ast_node_.is_native_instance_closure();
2543 }
2544
2545 virtual void PrintOperandsTo(BufferFormatter* f) const; 2537 virtual void PrintOperandsTo(BufferFormatter* f) const;
2546 2538
2547 virtual bool CanDeoptimize() const { return false; } 2539 virtual bool CanDeoptimize() const { return false; }
2548 2540
2549 virtual bool HasSideEffect() const { return true; } 2541 virtual bool HasSideEffect() const { return true; }
2550 2542
2551 virtual intptr_t ResultCid() const { return kDynamicCid; } 2543 virtual intptr_t ResultCid() const { return kDynamicCid; }
2552 2544
2553 private: 2545 private:
2554 const NativeBodyNode& ast_node_; 2546 const NativeBodyNode& ast_node_;
(...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after
4249 ForwardInstructionIterator* current_iterator_; 4241 ForwardInstructionIterator* current_iterator_;
4250 4242
4251 private: 4243 private:
4252 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 4244 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
4253 }; 4245 };
4254 4246
4255 4247
4256 } // namespace dart 4248 } // namespace dart
4257 4249
4258 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 4250 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698