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

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

Issue 14969019: A load static of an initialized static final field can be converted to its value, as long as it is … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/object.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_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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 static const Bool& bool_false() { 328 static const Bool& bool_false() {
329 ASSERT(bool_false_ != NULL); 329 ASSERT(bool_false_ != NULL);
330 return *bool_false_; 330 return *bool_false_;
331 } 331 }
332 static const LanguageError& snapshot_writer_error() { 332 static const LanguageError& snapshot_writer_error() {
333 ASSERT(snapshot_writer_error_ != NULL); 333 ASSERT(snapshot_writer_error_ != NULL);
334 return *snapshot_writer_error_; 334 return *snapshot_writer_error_;
335 } 335 }
336 336
337 // Compiler's constant propagation constants.
338 static const Instance& unknown_constant() {
339 ASSERT(unknown_constant_ != NULL);
340 return *unknown_constant_;
341 }
342 static const Instance& non_constant() {
343 ASSERT(non_constant_ != NULL);
344 return *non_constant_;
345 }
siva 2013/05/10 20:13:35 Can you move this new block to just below transiti
srdjan 2013/05/10 21:03:04 Done.
346
337 static RawClass* class_class() { return class_class_; } 347 static RawClass* class_class() { return class_class_; }
338 static RawClass* null_class() { return null_class_; } 348 static RawClass* null_class() { return null_class_; }
339 static RawClass* dynamic_class() { return dynamic_class_; } 349 static RawClass* dynamic_class() { return dynamic_class_; }
340 static RawClass* void_class() { return void_class_; } 350 static RawClass* void_class() { return void_class_; }
341 static RawClass* unresolved_class_class() { return unresolved_class_class_; } 351 static RawClass* unresolved_class_class() { return unresolved_class_class_; }
342 static RawClass* type_arguments_class() { return type_arguments_class_; } 352 static RawClass* type_arguments_class() { return type_arguments_class_; }
343 static RawClass* instantiated_type_arguments_class() { 353 static RawClass* instantiated_type_arguments_class() {
344 return instantiated_type_arguments_class_; 354 return instantiated_type_arguments_class_;
345 } 355 }
346 static RawClass* patch_class_class() { return patch_class_class_; } 356 static RawClass* patch_class_class() { return patch_class_class_; }
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 static RawClass* api_error_class_; // Class of ApiError. 526 static RawClass* api_error_class_; // Class of ApiError.
517 static RawClass* language_error_class_; // Class of LanguageError. 527 static RawClass* language_error_class_; // Class of LanguageError.
518 static RawClass* unhandled_exception_class_; // Class of UnhandledException. 528 static RawClass* unhandled_exception_class_; // Class of UnhandledException.
519 static RawClass* unwind_error_class_; // Class of UnwindError. 529 static RawClass* unwind_error_class_; // Class of UnwindError.
520 530
521 // The static values below are read-only handle pointers for singleton 531 // The static values below are read-only handle pointers for singleton
522 // objects that are shared between the different isolates. 532 // objects that are shared between the different isolates.
523 static Array* empty_array_; 533 static Array* empty_array_;
524 static Instance* sentinel_; 534 static Instance* sentinel_;
525 static Instance* transition_sentinel_; 535 static Instance* transition_sentinel_;
536 static Instance* unknown_constant_;
537 static Instance* non_constant_;
526 static Bool* bool_true_; 538 static Bool* bool_true_;
527 static Bool* bool_false_; 539 static Bool* bool_false_;
528 static LanguageError* snapshot_writer_error_; 540 static LanguageError* snapshot_writer_error_;
529 541
530 friend void ClassTable::Register(const Class& cls); 542 friend void ClassTable::Register(const Class& cls);
531 friend void RawObject::Validate(Isolate* isolate) const; 543 friend void RawObject::Validate(Isolate* isolate) const;
532 friend class Closure; 544 friend class Closure;
533 friend class SnapshotReader; 545 friend class SnapshotReader;
534 friend class OneByteString; 546 friend class OneByteString;
535 friend class TwoByteString; 547 friend class TwoByteString;
(...skipping 5202 matching lines...) Expand 10 before | Expand all | Expand 10 after
5738 5750
5739 5751
5740 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 5752 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
5741 intptr_t index) { 5753 intptr_t index) {
5742 return array.At((index * kEntryLength) + kTargetFunctionIndex); 5754 return array.At((index * kEntryLength) + kTargetFunctionIndex);
5743 } 5755 }
5744 5756
5745 } // namespace dart 5757 } // namespace dart
5746 5758
5747 #endif // VM_OBJECT_H_ 5759 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698