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

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

Issue 54713003: VM: Fix initialization of statics in presence of exceptions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
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 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 1516
1517 RawCode* closure_allocation_stub() const; 1517 RawCode* closure_allocation_stub() const;
1518 void set_closure_allocation_stub(const Code& value) const; 1518 void set_closure_allocation_stub(const Code& value) const;
1519 1519
1520 void set_extracted_method_closure(const Function& function) const; 1520 void set_extracted_method_closure(const Function& function) const;
1521 RawFunction* extracted_method_closure() const; 1521 RawFunction* extracted_method_closure() const;
1522 1522
1523 void set_saved_args_desc(const Array& array) const; 1523 void set_saved_args_desc(const Array& array) const;
1524 RawArray* saved_args_desc() const; 1524 RawArray* saved_args_desc() const;
1525 1525
1526 void set_saved_static_field(const Field& array) const;
1527 RawField* saved_static_field() const;
1528
1526 bool IsMethodExtractor() const { 1529 bool IsMethodExtractor() const {
1527 return kind() == RawFunction::kMethodExtractor; 1530 return kind() == RawFunction::kMethodExtractor;
1528 } 1531 }
1529 1532
1530 bool IsNoSuchMethodDispatcher() const { 1533 bool IsNoSuchMethodDispatcher() const {
1531 return kind() == RawFunction::kNoSuchMethodDispatcher; 1534 return kind() == RawFunction::kNoSuchMethodDispatcher;
1532 } 1535 }
1533 1536
1534 bool IsInvokeFieldDispatcher() const { 1537 bool IsInvokeFieldDispatcher() const {
1535 return kind() == RawFunction::kInvokeFieldDispatcher; 1538 return kind() == RawFunction::kInvokeFieldDispatcher;
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 // Allocates a new Function object representing a closure function, as well as 1872 // Allocates a new Function object representing a closure function, as well as
1870 // a new associated Class object representing the signature class of the 1873 // a new associated Class object representing the signature class of the
1871 // function. 1874 // function.
1872 // The function and the class share the same given name. 1875 // The function and the class share the same given name.
1873 static RawFunction* NewClosureFunction(const String& name, 1876 static RawFunction* NewClosureFunction(const String& name,
1874 const Function& parent, 1877 const Function& parent,
1875 intptr_t token_pos); 1878 intptr_t token_pos);
1876 1879
1877 // Creates a new static initializer function which is invoked in the implicit 1880 // Creates a new static initializer function which is invoked in the implicit
1878 // static getter function. 1881 // static getter function.
1879 static RawFunction* NewStaticInitializer(const String& field_name, 1882 static RawFunction* NewStaticInitializer(const Field& field);
1880 const AbstractType& result_type,
1881 const Class& cls,
1882 intptr_t token_pos);
1883 1883
1884 // Allocate new function object, clone values from this function. The 1884 // Allocate new function object, clone values from this function. The
1885 // owner of the clone is new_owner. 1885 // owner of the clone is new_owner.
1886 RawFunction* Clone(const Class& new_owner) const; 1886 RawFunction* Clone(const Class& new_owner) const;
1887 1887
1888 // Slow function, use in asserts to track changes in important library 1888 // Slow function, use in asserts to track changes in important library
1889 // functions. 1889 // functions.
1890 int32_t SourceFingerprint() const; 1890 int32_t SourceFingerprint() const;
1891 1891
1892 // Return false and report an error if the fingerprint does not match. 1892 // Return false and report an error if the fingerprint does not match.
(...skipping 4417 matching lines...) Expand 10 before | Expand all | Expand 10 after
6310 6310
6311 6311
6312 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6312 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6313 intptr_t index) { 6313 intptr_t index) {
6314 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6314 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6315 } 6315 }
6316 6316
6317 } // namespace dart 6317 } // namespace dart
6318 6318
6319 #endif // VM_OBJECT_H_ 6319 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698