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

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

Issue 2933603002: 1. Dynamic compute the main closure that needs to be run by the main isolate (Closed)
Patch Set: Remove redundant check. Created 3 years, 6 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
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 RUNTIME_VM_OBJECT_H_ 5 #ifndef RUNTIME_VM_OBJECT_H_
6 #define RUNTIME_VM_OBJECT_H_ 6 #define RUNTIME_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 3959 matching lines...) Expand 10 before | Expand all | Expand 10 after
3970 // Character used to indicate a private identifier. 3970 // Character used to indicate a private identifier.
3971 static const char kPrivateIdentifierStart = '_'; 3971 static const char kPrivateIdentifierStart = '_';
3972 3972
3973 // Character used to separate private identifiers from 3973 // Character used to separate private identifiers from
3974 // the library-specific key. 3974 // the library-specific key.
3975 static const char kPrivateKeySeparator = '@'; 3975 static const char kPrivateKeySeparator = '@';
3976 3976
3977 void CheckReload(const Library& replacement, 3977 void CheckReload(const Library& replacement,
3978 IsolateReloadContext* context) const; 3978 IsolateReloadContext* context) const;
3979 3979
3980 // Returns a closure of top level function 'name' in the exported namespace
3981 // of this library. If a top level function 'name' does not exist we look
3982 // for a top level getter 'name' that returns a closure.
3983 RawObject* GetFunctionClosure(const String& name) const;
3984
3980 private: 3985 private:
3981 static const int kInitialImportsCapacity = 4; 3986 static const int kInitialImportsCapacity = 4;
3982 static const int kImportsCapacityIncrement = 8; 3987 static const int kImportsCapacityIncrement = 8;
3983 3988
3984 static RawLibrary* New(); 3989 static RawLibrary* New();
3985 3990
3986 void set_num_imports(intptr_t value) const; 3991 void set_num_imports(intptr_t value) const;
3987 bool HasExports() const; 3992 bool HasExports() const;
3988 RawArray* loaded_scripts() const { return raw_ptr()->loaded_scripts_; } 3993 RawArray* loaded_scripts() const { return raw_ptr()->loaded_scripts_; }
3989 RawGrowableObjectArray* metadata() const { return raw_ptr()->metadata_; } 3994 RawGrowableObjectArray* metadata() const { return raw_ptr()->metadata_; }
(...skipping 5066 matching lines...) Expand 10 before | Expand all | Expand 10 after
9056 9061
9057 inline void TypeArguments::SetHash(intptr_t value) const { 9062 inline void TypeArguments::SetHash(intptr_t value) const {
9058 // This is only safe because we create a new Smi, which does not cause 9063 // This is only safe because we create a new Smi, which does not cause
9059 // heap allocation. 9064 // heap allocation.
9060 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 9065 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
9061 } 9066 }
9062 9067
9063 } // namespace dart 9068 } // namespace dart
9064 9069
9065 #endif // RUNTIME_VM_OBJECT_H_ 9070 #endif // RUNTIME_VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698