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

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

Issue 22897019: Detect circular dependencies in compile time constants (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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/object_store.h ('k') | runtime/vm/parser.h » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_store.h" 5 #include "vm/object_store.h"
6 6
7 #include "vm/exceptions.h" 7 #include "vm/exceptions.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 isolate_library_(Library::null()), 56 isolate_library_(Library::null()),
57 json_library_(Library::null()), 57 json_library_(Library::null()),
58 math_library_(Library::null()), 58 math_library_(Library::null()),
59 mirrors_library_(Library::null()), 59 mirrors_library_(Library::null()),
60 native_wrappers_library_(Library::null()), 60 native_wrappers_library_(Library::null()),
61 root_library_(Library::null()), 61 root_library_(Library::null()),
62 typed_data_library_(Library::null()), 62 typed_data_library_(Library::null()),
63 utf_library_(Library::null()), 63 utf_library_(Library::null()),
64 libraries_(GrowableObjectArray::null()), 64 libraries_(GrowableObjectArray::null()),
65 pending_classes_(GrowableObjectArray::null()), 65 pending_classes_(GrowableObjectArray::null()),
66 pending_functions_(GrowableObjectArray::null()),
66 sticky_error_(Error::null()), 67 sticky_error_(Error::null()),
67 unhandled_exception_handler_(String::null()), 68 unhandled_exception_handler_(String::null()),
68 empty_context_(Context::null()), 69 empty_context_(Context::null()),
69 stack_overflow_(Instance::null()), 70 stack_overflow_(Instance::null()),
70 out_of_memory_(Instance::null()), 71 out_of_memory_(Instance::null()),
71 preallocated_stack_trace_(Stacktrace::null()), 72 preallocated_stack_trace_(Stacktrace::null()),
72 keyword_symbols_(Array::null()), 73 keyword_symbols_(Array::null()),
73 receive_port_create_function_(Function::null()), 74 receive_port_create_function_(Function::null()),
74 lookup_receive_port_function_(Function::null()), 75 lookup_receive_port_function_(Function::null()),
75 handle_message_function_(Function::null()) { 76 handle_message_function_(Function::null()) {
(...skipping 22 matching lines...) Expand all
98 ASSERT(isolate != NULL && isolate->object_store() == this); 99 ASSERT(isolate != NULL && isolate->object_store() == this);
99 if (this->stack_overflow() != Instance::null()) { 100 if (this->stack_overflow() != Instance::null()) {
100 ASSERT(this->out_of_memory() != Instance::null()); 101 ASSERT(this->out_of_memory() != Instance::null());
101 ASSERT(this->preallocated_stack_trace() != Stacktrace::null()); 102 ASSERT(this->preallocated_stack_trace() != Stacktrace::null());
102 return true; 103 return true;
103 } 104 }
104 ASSERT(this->stack_overflow() == Instance::null()); 105 ASSERT(this->stack_overflow() == Instance::null());
105 ASSERT(this->out_of_memory() == Instance::null()); 106 ASSERT(this->out_of_memory() == Instance::null());
106 ASSERT(this->preallocated_stack_trace() == Stacktrace::null()); 107 ASSERT(this->preallocated_stack_trace() == Stacktrace::null());
107 108
109 ASSERT(this->pending_functions() == GrowableObjectArray::null());
110 this->pending_functions_ = GrowableObjectArray::New();
111
108 Object& result = Object::Handle(); 112 Object& result = Object::Handle();
109 const Library& library = Library::Handle(Library::CoreLibrary()); 113 const Library& library = Library::Handle(Library::CoreLibrary());
110 114
111 result = DartLibraryCalls::InstanceCreate(library, 115 result = DartLibraryCalls::InstanceCreate(library,
112 Symbols::StackOverflowError(), 116 Symbols::StackOverflowError(),
113 Symbols::Dot(), 117 Symbols::Dot(),
114 Object::empty_array()); 118 Object::empty_array());
115 if (result.IsError()) { 119 if (result.IsError()) {
116 return false; 120 return false;
117 } 121 }
(...skipping 26 matching lines...) Expand all
144 void ObjectStore::InitKeywordTable() { 148 void ObjectStore::InitKeywordTable() {
145 // Set up the keywords symbol array so that we can access it while scanning. 149 // Set up the keywords symbol array so that we can access it while scanning.
146 Array& keywords = Array::Handle(keyword_symbols()); 150 Array& keywords = Array::Handle(keyword_symbols());
147 ASSERT(keywords.IsNull()); 151 ASSERT(keywords.IsNull());
148 keywords = Array::New(Token::numKeywords, Heap::kOld); 152 keywords = Array::New(Token::numKeywords, Heap::kOld);
149 ASSERT(!keywords.IsError() && !keywords.IsNull()); 153 ASSERT(!keywords.IsError() && !keywords.IsNull());
150 set_keyword_symbols(keywords); 154 set_keyword_symbols(keywords);
151 } 155 }
152 156
153 } // namespace dart 157 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698