| OLD | NEW |
| 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 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2286 intptr_t* function_level) const; | 2286 intptr_t* function_level) const; |
| 2287 | 2287 |
| 2288 // Return true if this function declares type parameters. | 2288 // Return true if this function declares type parameters. |
| 2289 bool IsGeneric() const { return NumTypeParameters(Thread::Current()) > 0; } | 2289 bool IsGeneric() const { return NumTypeParameters(Thread::Current()) > 0; } |
| 2290 | 2290 |
| 2291 // Return true if any parent function of this function is generic. | 2291 // Return true if any parent function of this function is generic. |
| 2292 bool HasGenericParent() const; | 2292 bool HasGenericParent() const; |
| 2293 | 2293 |
| 2294 // Not thread-safe; must be called in the main thread. | 2294 // Not thread-safe; must be called in the main thread. |
| 2295 // Sets function's code and code's function. | 2295 // Sets function's code and code's function. |
| 2296 void InstallOptimizedCode(const Code& code, bool is_osr) const; | 2296 void InstallOptimizedCode(const Code& code) const; |
| 2297 void AttachCode(const Code& value) const; | 2297 void AttachCode(const Code& value) const; |
| 2298 void SetInstructions(const Code& value) const; | 2298 void SetInstructions(const Code& value) const; |
| 2299 void ClearCode() const; | 2299 void ClearCode() const; |
| 2300 | 2300 |
| 2301 // Disables optimized code and switches to unoptimized code. | 2301 // Disables optimized code and switches to unoptimized code. |
| 2302 void SwitchToUnoptimizedCode() const; | 2302 void SwitchToUnoptimizedCode() const; |
| 2303 | 2303 |
| 2304 // Disables optimized code and switches to unoptimized code (or the lazy | 2304 // Disables optimized code and switches to unoptimized code (or the lazy |
| 2305 // compilation stub). | 2305 // compilation stub). |
| 2306 void SwitchToLazyCompiledUnoptimizedCode() const; | 2306 void SwitchToLazyCompiledUnoptimizedCode() const; |
| (...skipping 6643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8950 | 8950 |
| 8951 inline void TypeArguments::SetHash(intptr_t value) const { | 8951 inline void TypeArguments::SetHash(intptr_t value) const { |
| 8952 // This is only safe because we create a new Smi, which does not cause | 8952 // This is only safe because we create a new Smi, which does not cause |
| 8953 // heap allocation. | 8953 // heap allocation. |
| 8954 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8954 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
| 8955 } | 8955 } |
| 8956 | 8956 |
| 8957 } // namespace dart | 8957 } // namespace dart |
| 8958 | 8958 |
| 8959 #endif // RUNTIME_VM_OBJECT_H_ | 8959 #endif // RUNTIME_VM_OBJECT_H_ |
| OLD | NEW |