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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
8 | 8 |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "lib/stacktrace.h" | 10 #include "lib/stacktrace.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 Heap::kNew)) { | 178 Heap::kNew)) { |
179 ASSERT(malformed_type_error.IsNull()); // Type is a raw Map. | 179 ASSERT(malformed_type_error.IsNull()); // Type is a raw Map. |
180 return instance.raw(); | 180 return instance.raw(); |
181 } | 181 } |
182 } | 182 } |
183 return Instance::null(); | 183 return Instance::null(); |
184 } | 184 } |
185 | 185 |
186 | 186 |
187 static bool IsCompiletimeErrorObject(Zone* zone, const Object& obj) { | 187 static bool IsCompiletimeErrorObject(Zone* zone, const Object& obj) { |
| 188 #if defined(DART_PRECOMPILED_RUNTIME) |
| 189 // All compile-time errors were handled at snapshot generation time and |
| 190 // compiletime_error_class was removed. |
| 191 return false; |
| 192 #else |
188 Isolate* I = Thread::Current()->isolate(); | 193 Isolate* I = Thread::Current()->isolate(); |
189 const Class& error_class = | 194 const Class& error_class = |
190 Class::Handle(zone, I->object_store()->compiletime_error_class()); | 195 Class::Handle(zone, I->object_store()->compiletime_error_class()); |
191 ASSERT(!error_class.IsNull()); | 196 ASSERT(!error_class.IsNull()); |
192 return (obj.GetClassId() == error_class.id()); | 197 return (obj.GetClassId() == error_class.id()); |
| 198 #endif |
193 } | 199 } |
194 | 200 |
195 | 201 |
196 static bool GetNativeStringArgument(NativeArguments* arguments, | 202 static bool GetNativeStringArgument(NativeArguments* arguments, |
197 int arg_index, | 203 int arg_index, |
198 Dart_Handle* str, | 204 Dart_Handle* str, |
199 void** peer) { | 205 void** peer) { |
200 ASSERT(peer != NULL); | 206 ASSERT(peer != NULL); |
201 if (Api::StringGetPeerHelper(arguments, arg_index, peer)) { | 207 if (Api::StringGetPeerHelper(arguments, arg_index, peer)) { |
202 *str = NULL; | 208 *str = NULL; |
(...skipping 6397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6600 | 6606 |
6601 DART_EXPORT bool Dart_IsPrecompiledRuntime() { | 6607 DART_EXPORT bool Dart_IsPrecompiledRuntime() { |
6602 #if defined(DART_PRECOMPILED_RUNTIME) | 6608 #if defined(DART_PRECOMPILED_RUNTIME) |
6603 return true; | 6609 return true; |
6604 #else | 6610 #else |
6605 return false; | 6611 return false; |
6606 #endif | 6612 #endif |
6607 } | 6613 } |
6608 | 6614 |
6609 } // namespace dart | 6615 } // namespace dart |
OLD | NEW |