| OLD | NEW |
| 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/globals.h" // Needed here to get TARGET_ARCH_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/code_generator.h" | 8 #include "vm/code_generator.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 __ nop(5); | 207 __ nop(5); |
| 208 } | 208 } |
| 209 | 209 |
| 210 | 210 |
| 211 // Verify assumptions (in debug mode only). | 211 // Verify assumptions (in debug mode only). |
| 212 // - No two deopt descriptors have the same node id (deoptimization). | 212 // - No two deopt descriptors have the same node id (deoptimization). |
| 213 // - No two ic-call descriptors have the same node id (type feedback). | 213 // - No two ic-call descriptors have the same node id (type feedback). |
| 214 // - No two descriptors of same kind have the same PC. | 214 // - No two descriptors of same kind have the same PC. |
| 215 // A function without unique ids is marked as non-optimizable (e.g., because of | 215 // A function without unique ids is marked as non-optimizable (e.g., because of |
| 216 // finally blocks). | 216 // finally blocks). |
| 217 static void VerifyPcDescriptors(const PcDescriptors& descriptors, | 217 void CodeGenerator::VerifyPcDescriptors(const PcDescriptors& descriptors, |
| 218 bool check_ids) { | 218 bool check_ids) { |
| 219 #if defined(DEBUG) | 219 #if defined(DEBUG) |
| 220 // TODO(srdjan): Implement a more efficient way to check, currently drop | 220 // TODO(srdjan): Implement a more efficient way to check, currently drop |
| 221 // the check for too large number of descriptors. | 221 // the check for too large number of descriptors. |
| 222 if (descriptors.Length() > 3000) { | 222 if (descriptors.Length() > 3000) { |
| 223 if (FLAG_trace_compiler) { | 223 if (FLAG_trace_compiler) { |
| 224 OS::Print("Not checking pc decriptors, length %d\n", | 224 OS::Print("Not checking pc decriptors, length %d\n", |
| 225 descriptors.Length()); | 225 descriptors.Length()); |
| 226 } | 226 } |
| 227 return; | 227 return; |
| 228 } | 228 } |
| (...skipping 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2719 const Error& error = Error::Handle( | 2719 const Error& error = Error::Handle( |
| 2720 Parser::FormatError(script, token_index, "Error", format, args)); | 2720 Parser::FormatError(script, token_index, "Error", format, args)); |
| 2721 va_end(args); | 2721 va_end(args); |
| 2722 Isolate::Current()->long_jump_base()->Jump(1, error); | 2722 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2723 UNREACHABLE(); | 2723 UNREACHABLE(); |
| 2724 } | 2724 } |
| 2725 | 2725 |
| 2726 } // namespace dart | 2726 } // namespace dart |
| 2727 | 2727 |
| 2728 #endif // defined TARGET_ARCH_IA32 | 2728 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |