OLD | NEW |
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 typed_data_library_(Library::null()), | 61 typed_data_library_(Library::null()), |
62 libraries_(GrowableObjectArray::null()), | 62 libraries_(GrowableObjectArray::null()), |
63 pending_classes_(GrowableObjectArray::null()), | 63 pending_classes_(GrowableObjectArray::null()), |
64 pending_functions_(GrowableObjectArray::null()), | 64 pending_functions_(GrowableObjectArray::null()), |
65 sticky_error_(Error::null()), | 65 sticky_error_(Error::null()), |
66 unhandled_exception_handler_(String::null()), | 66 unhandled_exception_handler_(String::null()), |
67 empty_context_(Context::null()), | 67 empty_context_(Context::null()), |
68 stack_overflow_(Instance::null()), | 68 stack_overflow_(Instance::null()), |
69 out_of_memory_(Instance::null()), | 69 out_of_memory_(Instance::null()), |
70 preallocated_stack_trace_(Stacktrace::null()), | 70 preallocated_stack_trace_(Stacktrace::null()), |
71 keyword_symbols_(Array::null()), | |
72 receive_port_create_function_(Function::null()), | 71 receive_port_create_function_(Function::null()), |
73 lookup_receive_port_function_(Function::null()), | 72 lookup_receive_port_function_(Function::null()), |
74 handle_message_function_(Function::null()) { | 73 handle_message_function_(Function::null()) { |
75 } | 74 } |
76 | 75 |
77 | 76 |
78 ObjectStore::~ObjectStore() { | 77 ObjectStore::~ObjectStore() { |
79 } | 78 } |
80 | 79 |
81 | 80 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 const Stacktrace& stack_trace = | 135 const Stacktrace& stack_trace = |
137 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); | 136 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); |
138 // Expansion of inlined functions requires additional memory at run time, | 137 // Expansion of inlined functions requires additional memory at run time, |
139 // avoid it. | 138 // avoid it. |
140 stack_trace.set_expand_inlined(false); | 139 stack_trace.set_expand_inlined(false); |
141 set_preallocated_stack_trace(stack_trace); | 140 set_preallocated_stack_trace(stack_trace); |
142 | 141 |
143 return true; | 142 return true; |
144 } | 143 } |
145 | 144 |
146 | |
147 void ObjectStore::InitKeywordTable() { | |
148 // Set up the keywords symbol array so that we can access it while scanning. | |
149 Array& keywords = Array::Handle(keyword_symbols()); | |
150 ASSERT(keywords.IsNull()); | |
151 keywords = Array::New(Token::numKeywords, Heap::kOld); | |
152 ASSERT(!keywords.IsError() && !keywords.IsNull()); | |
153 set_keyword_symbols(keywords); | |
154 } | |
155 | |
156 } // namespace dart | 145 } // namespace dart |
OLD | NEW |