| 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 DEFINE_FLAG(int, huge_method_cutoff_in_code_size, 200000, | 48 DEFINE_FLAG(int, huge_method_cutoff_in_code_size, 200000, |
| 49 "Huge method cutoff in unoptimized code size (in bytes)."); | 49 "Huge method cutoff in unoptimized code size (in bytes)."); |
| 50 DEFINE_FLAG(int, huge_method_cutoff_in_tokens, 20000, | 50 DEFINE_FLAG(int, huge_method_cutoff_in_tokens, 20000, |
| 51 "Huge method cutoff in tokens: Disables optimizations for huge methods."); | 51 "Huge method cutoff in tokens: Disables optimizations for huge methods."); |
| 52 DEFINE_FLAG(bool, overlap_type_arguments, true, | 52 DEFINE_FLAG(bool, overlap_type_arguments, true, |
| 53 "When possible, partially or fully overlap the type arguments of a type " | 53 "When possible, partially or fully overlap the type arguments of a type " |
| 54 "with the type arguments of its super type."); | 54 "with the type arguments of its super type."); |
| 55 DEFINE_FLAG(bool, show_internal_names, false, | 55 DEFINE_FLAG(bool, show_internal_names, false, |
| 56 "Show names of internal classes (e.g. \"OneByteString\") in error messages " | 56 "Show names of internal classes (e.g. \"OneByteString\") in error messages " |
| 57 "instead of showing the corresponding interface names (e.g. \"String\")"); | 57 "instead of showing the corresponding interface names (e.g. \"String\")"); |
| 58 DEFINE_FLAG(bool, use_field_guards, true, "Guard field cids."); | |
| 59 DEFINE_FLAG(bool, use_lib_cache, true, "Use library name cache"); | 58 DEFINE_FLAG(bool, use_lib_cache, true, "Use library name cache"); |
| 60 DEFINE_FLAG(bool, ignore_patch_signature_mismatch, false, | 59 DEFINE_FLAG(bool, ignore_patch_signature_mismatch, false, |
| 61 "Ignore patch file member signature mismatch."); | 60 "Ignore patch file member signature mismatch."); |
| 62 | 61 |
| 63 DECLARE_FLAG(charp, coverage_dir); | 62 DECLARE_FLAG(charp, coverage_dir); |
| 64 DECLARE_FLAG(bool, load_deferred_eagerly); | |
| 65 DECLARE_FLAG(bool, precompilation); | |
| 66 DECLARE_FLAG(bool, show_invisible_frames); | 63 DECLARE_FLAG(bool, show_invisible_frames); |
| 67 DECLARE_FLAG(bool, trace_deoptimization); | 64 DECLARE_FLAG(bool, trace_deoptimization); |
| 68 DECLARE_FLAG(bool, trace_deoptimization_verbose); | 65 DECLARE_FLAG(bool, trace_deoptimization_verbose); |
| 69 DECLARE_FLAG(bool, write_protect_code); | 66 DECLARE_FLAG(bool, write_protect_code); |
| 70 | 67 |
| 71 | 68 |
| 72 static const char* const kGetterPrefix = "get:"; | 69 static const char* const kGetterPrefix = "get:"; |
| 73 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix); | 70 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix); |
| 74 static const char* const kSetterPrefix = "set:"; | 71 static const char* const kSetterPrefix = "set:"; |
| 75 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix); | 72 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix); |
| (...skipping 21022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21098 OS::SNPrint(chars, truncated_len, "%s", kTruncated); | 21095 OS::SNPrint(chars, truncated_len, "%s", kTruncated); |
| 21099 frame_strings.Add(chars); | 21096 frame_strings.Add(chars); |
| 21100 total_len += truncated_len; | 21097 total_len += truncated_len; |
| 21101 } | 21098 } |
| 21102 } else { | 21099 } else { |
| 21103 code = CodeAtFrame(i); | 21100 code = CodeAtFrame(i); |
| 21104 ASSERT(function.raw() == code.function()); | 21101 ASSERT(function.raw() == code.function()); |
| 21105 uword pc = code.EntryPoint() + Smi::Value(PcOffsetAtFrame(i)); | 21102 uword pc = code.EntryPoint() + Smi::Value(PcOffsetAtFrame(i)); |
| 21106 if (code.is_optimized() && expand_inlined()) { | 21103 if (code.is_optimized() && expand_inlined()) { |
| 21107 // Traverse inlined frames. | 21104 // Traverse inlined frames. |
| 21108 if (!FLAG_precompilation) { | 21105 if (!FLAG_precompiled_mode) { |
| 21109 for (InlinedFunctionsIterator it(code, pc); | 21106 for (InlinedFunctionsIterator it(code, pc); |
| 21110 !it.Done() && (*frame_index < max_frames); it.Advance()) { | 21107 !it.Done() && (*frame_index < max_frames); it.Advance()) { |
| 21111 function = it.function(); | 21108 function = it.function(); |
| 21112 if (function.is_visible() || FLAG_show_invisible_frames) { | 21109 if (function.is_visible() || FLAG_show_invisible_frames) { |
| 21113 code = it.code(); | 21110 code = it.code(); |
| 21114 ASSERT(function.raw() == code.function()); | 21111 ASSERT(function.raw() == code.function()); |
| 21115 uword pc = it.pc(); | 21112 uword pc = it.pc(); |
| 21116 ASSERT(pc != 0); | 21113 ASSERT(pc != 0); |
| 21117 ASSERT(code.EntryPoint() <= pc); | 21114 ASSERT(code.EntryPoint() <= pc); |
| 21118 ASSERT(pc < (code.EntryPoint() + code.Size())); | 21115 ASSERT(pc < (code.EntryPoint() + code.Size())); |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21471 return UserTag::null(); | 21468 return UserTag::null(); |
| 21472 } | 21469 } |
| 21473 | 21470 |
| 21474 | 21471 |
| 21475 const char* UserTag::ToCString() const { | 21472 const char* UserTag::ToCString() const { |
| 21476 const String& tag_label = String::Handle(label()); | 21473 const String& tag_label = String::Handle(label()); |
| 21477 return tag_label.ToCString(); | 21474 return tag_label.ToCString(); |
| 21478 } | 21475 } |
| 21479 | 21476 |
| 21480 } // namespace dart | 21477 } // namespace dart |
| OLD | NEW |