| 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/isolate.h" | 8 #include "vm/isolate.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/raw_object.h" | 10 #include "vm/raw_object.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 Isolate* isolate = Isolate::Current(); | 97 Isolate* isolate = Isolate::Current(); |
| 98 ASSERT(isolate != NULL && isolate->object_store() == this); | 98 ASSERT(isolate != NULL && isolate->object_store() == this); |
| 99 if (this->stack_overflow() != Instance::null()) { | 99 if (this->stack_overflow() != Instance::null()) { |
| 100 ASSERT(this->out_of_memory() != Instance::null()); | 100 ASSERT(this->out_of_memory() != Instance::null()); |
| 101 ASSERT(this->preallocated_stack_trace() != Stacktrace::null()); | 101 ASSERT(this->preallocated_stack_trace() != Stacktrace::null()); |
| 102 return true; | 102 return true; |
| 103 } | 103 } |
| 104 ASSERT(this->stack_overflow() == Instance::null()); | 104 ASSERT(this->stack_overflow() == Instance::null()); |
| 105 ASSERT(this->out_of_memory() == Instance::null()); | 105 ASSERT(this->out_of_memory() == Instance::null()); |
| 106 ASSERT(this->preallocated_stack_trace() == Stacktrace::null()); | 106 ASSERT(this->preallocated_stack_trace() == Stacktrace::null()); |
| 107 // TODO(regis): Reenable this code for arm and mips when possible. | 107 // TODO(regis): Reenable this code for mips when possible. |
| 108 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) | 108 #if defined(TARGET_ARCH_IA32) || \ |
| 109 defined(TARGET_ARCH_X64) || \ |
| 110 defined(TARGET_ARCH_ARM) |
| 109 Object& result = Object::Handle(); | 111 Object& result = Object::Handle(); |
| 110 | 112 |
| 111 result = Exceptions::Create(Exceptions::kStackOverflow, | 113 result = Exceptions::Create(Exceptions::kStackOverflow, |
| 112 Object::empty_array()); | 114 Object::empty_array()); |
| 113 if (result.IsError()) { | 115 if (result.IsError()) { |
| 114 return false; | 116 return false; |
| 115 } | 117 } |
| 116 set_stack_overflow(Instance::Cast(result)); | 118 set_stack_overflow(Instance::Cast(result)); |
| 117 | 119 |
| 118 result = Exceptions::Create(Exceptions::kOutOfMemory, Object::empty_array()); | 120 result = Exceptions::Create(Exceptions::kOutOfMemory, Object::empty_array()); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 139 void ObjectStore::InitKeywordTable() { | 141 void ObjectStore::InitKeywordTable() { |
| 140 // Set up the keywords symbol array so that we can access it while scanning. | 142 // Set up the keywords symbol array so that we can access it while scanning. |
| 141 Array& keywords = Array::Handle(keyword_symbols()); | 143 Array& keywords = Array::Handle(keyword_symbols()); |
| 142 ASSERT(keywords.IsNull()); | 144 ASSERT(keywords.IsNull()); |
| 143 keywords = Array::New(Token::numKeywords, Heap::kOld); | 145 keywords = Array::New(Token::numKeywords, Heap::kOld); |
| 144 ASSERT(!keywords.IsError() && !keywords.IsNull()); | 146 ASSERT(!keywords.IsError() && !keywords.IsNull()); |
| 145 set_keyword_symbols(keywords); | 147 set_keyword_symbols(keywords); |
| 146 } | 148 } |
| 147 | 149 |
| 148 } // namespace dart | 150 } // namespace dart |
| OLD | NEW |