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

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

Issue 1255063005: Constructor tear-off closures (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Skip tearoff test in analyzer and dart2js Created 5 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
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/parser.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_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 return is_static() && IsImplicitClosureFunction(); 2478 return is_static() && IsImplicitClosureFunction();
2479 } 2479 }
2480 bool static IsImplicitStaticClosureFunction(RawFunction* func); 2480 bool static IsImplicitStaticClosureFunction(RawFunction* func);
2481 2481
2482 // Returns true if this function represents an implicit instance closure 2482 // Returns true if this function represents an implicit instance closure
2483 // function. 2483 // function.
2484 bool IsImplicitInstanceClosureFunction() const { 2484 bool IsImplicitInstanceClosureFunction() const {
2485 return !is_static() && IsImplicitClosureFunction(); 2485 return !is_static() && IsImplicitClosureFunction();
2486 } 2486 }
2487 2487
2488 bool IsConstructorClosureFunction() const;
2489
2488 // Returns true if this function represents a local function. 2490 // Returns true if this function represents a local function.
2489 bool IsLocalFunction() const { 2491 bool IsLocalFunction() const {
2490 return parent_function() != Function::null(); 2492 return parent_function() != Function::null();
2491 } 2493 }
2492 2494
2493 // Returns true if this function represents a signature function without code. 2495 // Returns true if this function represents a signature function without code.
2494 bool IsSignatureFunction() const { 2496 bool IsSignatureFunction() const {
2495 return kind() == RawFunction::kSignatureFunction; 2497 return kind() == RawFunction::kSignatureFunction;
2496 } 2498 }
2497 2499
(...skipping 5524 matching lines...) Expand 10 before | Expand all | Expand 10 after
8022 8024
8023 8025
8024 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8026 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8025 intptr_t index) { 8027 intptr_t index) {
8026 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8028 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8027 } 8029 }
8028 8030
8029 } // namespace dart 8031 } // namespace dart
8030 8032
8031 #endif // VM_OBJECT_H_ 8033 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698