Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: runtime/vm/object.cc

Issue 868453002: Rename is_visible to is_reflectable; use is_debuggable instead of is_reflectable (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 "fit into a javascript integer."); 66 "fit into a javascript integer.");
67 DEFINE_FLAG(bool, use_field_guards, true, "Guard field cids."); 67 DEFINE_FLAG(bool, use_field_guards, true, "Guard field cids.");
68 DEFINE_FLAG(bool, use_lib_cache, true, "Use library name cache"); 68 DEFINE_FLAG(bool, use_lib_cache, true, "Use library name cache");
69 DEFINE_FLAG(bool, trace_field_guards, false, "Trace changes in field's cids."); 69 DEFINE_FLAG(bool, trace_field_guards, false, "Trace changes in field's cids.");
70 70
71 DECLARE_FLAG(bool, enable_type_checks); 71 DECLARE_FLAG(bool, enable_type_checks);
72 DECLARE_FLAG(bool, error_on_bad_override); 72 DECLARE_FLAG(bool, error_on_bad_override);
73 DECLARE_FLAG(bool, trace_compiler); 73 DECLARE_FLAG(bool, trace_compiler);
74 DECLARE_FLAG(bool, trace_deoptimization); 74 DECLARE_FLAG(bool, trace_deoptimization);
75 DECLARE_FLAG(bool, trace_deoptimization_verbose); 75 DECLARE_FLAG(bool, trace_deoptimization_verbose);
76 DECLARE_FLAG(bool, verbose_stacktrace); 76 DECLARE_FLAG(bool, show_invisible_frames);
77 DECLARE_FLAG(charp, coverage_dir); 77 DECLARE_FLAG(charp, coverage_dir);
78 DECLARE_FLAG(bool, write_protect_code); 78 DECLARE_FLAG(bool, write_protect_code);
79 79
80 static const char* kGetterPrefix = "get:"; 80 static const char* kGetterPrefix = "get:";
81 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix); 81 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix);
82 static const char* kSetterPrefix = "set:"; 82 static const char* kSetterPrefix = "set:";
83 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix); 83 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix);
84 84
85 cpp_vtable Object::handle_vtable_ = 0; 85 cpp_vtable Object::handle_vtable_ = 0;
86 cpp_vtable Object::builtin_vtables_[kNumPredefinedCids] = { 0 }; 86 cpp_vtable Object::builtin_vtables_[kNumPredefinedCids] = { 0 };
(...skipping 2486 matching lines...) Expand 10 before | Expand all | Expand 10 after
2573 } 2573 }
2574 2574
2575 // Named parameters. 2575 // Named parameters.
2576 for (; i < desc.Count(); i++) { 2576 for (; i < desc.Count(); i++) {
2577 invocation.SetParameterTypeAt(i, Type::Handle(Type::DynamicType())); 2577 invocation.SetParameterTypeAt(i, Type::Handle(Type::DynamicType()));
2578 intptr_t index = i - desc.PositionalCount(); 2578 intptr_t index = i - desc.PositionalCount();
2579 invocation.SetParameterNameAt(i, String::Handle(desc.NameAt(index))); 2579 invocation.SetParameterNameAt(i, String::Handle(desc.NameAt(index)));
2580 } 2580 }
2581 invocation.set_result_type(Type::Handle(Type::DynamicType())); 2581 invocation.set_result_type(Type::Handle(Type::DynamicType()));
2582 invocation.set_is_debuggable(false); 2582 invocation.set_is_debuggable(false);
2583 invocation.set_is_visible(false); // Not visible in stack trace. 2583 invocation.set_is_reflectable(false);
2584 invocation.set_saved_args_desc(args_desc); 2584 invocation.set_saved_args_desc(args_desc);
2585 2585
2586 return invocation.raw(); 2586 return invocation.raw();
2587 } 2587 }
2588 2588
2589 2589
2590 RawArray* Class::invocation_dispatcher_cache() const { 2590 RawArray* Class::invocation_dispatcher_cache() const {
2591 return raw_ptr()->invocation_dispatcher_cache_; 2591 return raw_ptr()->invocation_dispatcher_cache_;
2592 } 2592 }
2593 2593
(...skipping 3506 matching lines...) Expand 10 before | Expand all | Expand 10 after
6100 result.set_parameter_names(Object::empty_array()); 6100 result.set_parameter_names(Object::empty_array());
6101 result.set_name(name); 6101 result.set_name(name);
6102 result.set_kind(kind); 6102 result.set_kind(kind);
6103 result.set_recognized_kind(MethodRecognizer::kUnknown); 6103 result.set_recognized_kind(MethodRecognizer::kUnknown);
6104 result.set_modifier(RawFunction::kNoModifier); 6104 result.set_modifier(RawFunction::kNoModifier);
6105 result.set_is_static(is_static); 6105 result.set_is_static(is_static);
6106 result.set_is_const(is_const); 6106 result.set_is_const(is_const);
6107 result.set_is_abstract(is_abstract); 6107 result.set_is_abstract(is_abstract);
6108 result.set_is_external(is_external); 6108 result.set_is_external(is_external);
6109 result.set_is_native(is_native); 6109 result.set_is_native(is_native);
6110 result.set_is_visible(true); // Will be computed later. 6110 result.set_is_reflectable(true); // Will be computed later.
6111 result.set_is_debuggable(true); // Will be computed later. 6111 result.set_is_debuggable(true); // Will be computed later.
6112 result.set_is_intrinsic(false); 6112 result.set_is_intrinsic(false);
6113 result.set_is_redirecting(false); 6113 result.set_is_redirecting(false);
6114 result.set_is_async_closure(false); 6114 result.set_is_async_closure(false);
6115 result.set_always_inline(false); 6115 result.set_always_inline(false);
6116 result.set_is_polymorphic_target(false); 6116 result.set_is_polymorphic_target(false);
6117 result.set_owner(owner); 6117 result.set_owner(owner);
6118 result.set_token_pos(token_pos); 6118 result.set_token_pos(token_pos);
6119 result.set_end_token_pos(token_pos); 6119 result.set_end_token_pos(token_pos);
6120 result.set_num_fixed_parameters(0); 6120 result.set_num_fixed_parameters(0);
(...skipping 14022 matching lines...) Expand 10 before | Expand all | Expand 10 after
20143 if (function.IsNull()) { 20143 if (function.IsNull()) {
20144 // Check if null function object indicates a stack trace overflow. 20144 // Check if null function object indicates a stack trace overflow.
20145 if ((i < (Length() - 1)) && 20145 if ((i < (Length() - 1)) &&
20146 (FunctionAtFrame(i + 1) != Function::null())) { 20146 (FunctionAtFrame(i + 1) != Function::null())) {
20147 const char* kTruncated = "...\n...\n"; 20147 const char* kTruncated = "...\n...\n";
20148 intptr_t truncated_len = strlen(kTruncated) + 1; 20148 intptr_t truncated_len = strlen(kTruncated) + 1;
20149 char* chars = isolate->current_zone()->Alloc<char>(truncated_len); 20149 char* chars = isolate->current_zone()->Alloc<char>(truncated_len);
20150 OS::SNPrint(chars, truncated_len, "%s", kTruncated); 20150 OS::SNPrint(chars, truncated_len, "%s", kTruncated);
20151 frame_strings.Add(chars); 20151 frame_strings.Add(chars);
20152 } 20152 }
20153 } else if (function.is_visible() || FLAG_verbose_stacktrace) { 20153 } else if (function.is_stacktrace_visible() || FLAG_show_invisible_frames) {
20154 code = CodeAtFrame(i); 20154 code = CodeAtFrame(i);
20155 ASSERT(function.raw() == code.function()); 20155 ASSERT(function.raw() == code.function());
20156 uword pc = code.EntryPoint() + Smi::Value(PcOffsetAtFrame(i)); 20156 uword pc = code.EntryPoint() + Smi::Value(PcOffsetAtFrame(i));
20157 if (code.is_optimized() && expand_inlined()) { 20157 if (code.is_optimized() && expand_inlined()) {
20158 // Traverse inlined frames. 20158 // Traverse inlined frames.
20159 for (InlinedFunctionsIterator it(code, pc); 20159 for (InlinedFunctionsIterator it(code, pc);
20160 !it.Done() && (*frame_index < max_frames); it.Advance()) { 20160 !it.Done() && (*frame_index < max_frames); it.Advance()) {
20161 function = it.function(); 20161 function = it.function();
20162 if (function.is_visible() || FLAG_verbose_stacktrace) { 20162 if (function.is_stacktrace_visible() || FLAG_show_invisible_frames) {
20163 code = it.code(); 20163 code = it.code();
20164 ASSERT(function.raw() == code.function()); 20164 ASSERT(function.raw() == code.function());
20165 uword pc = it.pc(); 20165 uword pc = it.pc();
20166 ASSERT(pc != 0); 20166 ASSERT(pc != 0);
20167 ASSERT(code.EntryPoint() <= pc); 20167 ASSERT(code.EntryPoint() <= pc);
20168 ASSERT(pc < (code.EntryPoint() + code.Size())); 20168 ASSERT(pc < (code.EntryPoint() + code.Size()));
20169 total_len += PrintOneStacktrace( 20169 total_len += PrintOneStacktrace(
20170 isolate, &frame_strings, pc, function, code, *frame_index); 20170 isolate, &frame_strings, pc, function, code, *frame_index);
20171 (*frame_index)++; // To account for inlined frames. 20171 (*frame_index)++; // To account for inlined frames.
20172 } 20172 }
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
20532 return tag_label.ToCString(); 20532 return tag_label.ToCString();
20533 } 20533 }
20534 20534
20535 20535
20536 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 20536 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
20537 Instance::PrintJSONImpl(stream, ref); 20537 Instance::PrintJSONImpl(stream, ref);
20538 } 20538 }
20539 20539
20540 20540
20541 } // namespace dart 20541 } // namespace dart
OLDNEW
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698