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

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

Issue 10916039: Throw AbstractClassInstantiationError if an abstract class is instantiated (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
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 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 ASSERT(token_pos >= 0); 1828 ASSERT(token_pos >= 0);
1829 raw_ptr()->token_pos_ = token_pos; 1829 raw_ptr()->token_pos_ = token_pos;
1830 } 1830 }
1831 1831
1832 1832
1833 void Class::set_is_interface() const { 1833 void Class::set_is_interface() const {
1834 uword bits = raw_ptr()->state_bits_; 1834 uword bits = raw_ptr()->state_bits_;
1835 raw_ptr()->state_bits_ = InterfaceBit::update(true, bits); 1835 raw_ptr()->state_bits_ = InterfaceBit::update(true, bits);
1836 } 1836 }
1837 1837
1838 void Class::set_is_abstract() const {
1839 uword bits = raw_ptr()->state_bits_;
1840 raw_ptr()->state_bits_ = AbstractBit::update(true, bits);
1841 }
1842
1838 1843
1839 void Class::set_is_const() const { 1844 void Class::set_is_const() const {
1840 uword bits = raw_ptr()->state_bits_; 1845 uword bits = raw_ptr()->state_bits_;
1841 raw_ptr()->state_bits_ = ConstBit::update(true, bits); 1846 raw_ptr()->state_bits_ = ConstBit::update(true, bits);
1842 } 1847 }
1843 1848
1844 1849
1845 void Class::set_is_finalized() const { 1850 void Class::set_is_finalized() const {
1846 ASSERT(!is_finalized()); 1851 ASSERT(!is_finalized());
1847 uword bits = raw_ptr()->state_bits_; 1852 uword bits = raw_ptr()->state_bits_;
(...skipping 9333 matching lines...) Expand 10 before | Expand all | Expand 10 after
11181 } 11186 }
11182 return result.raw(); 11187 return result.raw();
11183 } 11188 }
11184 11189
11185 11190
11186 const char* WeakProperty::ToCString() const { 11191 const char* WeakProperty::ToCString() const {
11187 return "_WeakProperty"; 11192 return "_WeakProperty";
11188 } 11193 }
11189 11194
11190 } // namespace dart 11195 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698