OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 13384 matching lines...) Loading... |
13395 shared->set_script(*script_object); | 13395 shared->set_script(*script_object); |
13396 } | 13396 } |
13397 | 13397 |
13398 | 13398 |
13399 String* SharedFunctionInfo::DebugName() { | 13399 String* SharedFunctionInfo::DebugName() { |
13400 Object* n = name(); | 13400 Object* n = name(); |
13401 if (!n->IsString() || String::cast(n)->length() == 0) return inferred_name(); | 13401 if (!n->IsString() || String::cast(n)->length() == 0) return inferred_name(); |
13402 return String::cast(n); | 13402 return String::cast(n); |
13403 } | 13403 } |
13404 | 13404 |
| 13405 bool SharedFunctionInfo::DebugIsBlackboxed() { |
| 13406 if (!computed_debug_is_blackboxed()) { |
| 13407 Handle<SharedFunctionInfo> info(this); |
| 13408 set_debug_is_blackboxed(info->GetIsolate()->debug()->IsBlackboxed(info)); |
| 13409 set_computed_debug_is_blackboxed(true); |
| 13410 } |
| 13411 return debug_is_blackboxed(); |
| 13412 } |
| 13413 |
13405 bool SharedFunctionInfo::HasNoSideEffect() { | 13414 bool SharedFunctionInfo::HasNoSideEffect() { |
13406 if (!computed_has_no_side_effect()) { | 13415 if (!computed_has_no_side_effect()) { |
13407 DisallowHeapAllocation not_handlified; | 13416 DisallowHeapAllocation not_handlified; |
13408 Handle<SharedFunctionInfo> info(this); | 13417 Handle<SharedFunctionInfo> info(this); |
13409 set_has_no_side_effect(DebugEvaluate::FunctionHasNoSideEffect(info)); | 13418 set_has_no_side_effect(DebugEvaluate::FunctionHasNoSideEffect(info)); |
13410 set_computed_has_no_side_effect(true); | 13419 set_computed_has_no_side_effect(true); |
13411 } | 13420 } |
13412 return has_no_side_effect(); | 13421 return has_no_side_effect(); |
13413 } | 13422 } |
13414 | 13423 |
(...skipping 6595 matching lines...) Loading... |
20010 // depend on this. | 20019 // depend on this. |
20011 return DICTIONARY_ELEMENTS; | 20020 return DICTIONARY_ELEMENTS; |
20012 } | 20021 } |
20013 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20022 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20014 return kind; | 20023 return kind; |
20015 } | 20024 } |
20016 } | 20025 } |
20017 | 20026 |
20018 } // namespace internal | 20027 } // namespace internal |
20019 } // namespace v8 | 20028 } // namespace v8 |
OLD | NEW |