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 10 matching lines...) Expand all Loading... |
21 #include "src/base/bits.h" | 21 #include "src/base/bits.h" |
22 #include "src/base/utils/random-number-generator.h" | 22 #include "src/base/utils/random-number-generator.h" |
23 #include "src/bootstrapper.h" | 23 #include "src/bootstrapper.h" |
24 #include "src/code-stubs.h" | 24 #include "src/code-stubs.h" |
25 #include "src/codegen.h" | 25 #include "src/codegen.h" |
26 #include "src/compilation-dependencies.h" | 26 #include "src/compilation-dependencies.h" |
27 #include "src/compiler.h" | 27 #include "src/compiler.h" |
28 #include "src/counters-inl.h" | 28 #include "src/counters-inl.h" |
29 #include "src/counters.h" | 29 #include "src/counters.h" |
30 #include "src/date.h" | 30 #include "src/date.h" |
| 31 #include "src/debug/debug-evaluate.h" |
31 #include "src/debug/debug.h" | 32 #include "src/debug/debug.h" |
32 #include "src/deoptimizer.h" | 33 #include "src/deoptimizer.h" |
33 #include "src/elements.h" | 34 #include "src/elements.h" |
34 #include "src/execution.h" | 35 #include "src/execution.h" |
35 #include "src/field-index-inl.h" | 36 #include "src/field-index-inl.h" |
36 #include "src/field-index.h" | 37 #include "src/field-index.h" |
37 #include "src/field-type.h" | 38 #include "src/field-type.h" |
38 #include "src/frames-inl.h" | 39 #include "src/frames-inl.h" |
39 #include "src/full-codegen/full-codegen.h" | 40 #include "src/full-codegen/full-codegen.h" |
40 #include "src/globals.h" | 41 #include "src/globals.h" |
(...skipping 13301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13342 shared->set_script(*script_object); | 13343 shared->set_script(*script_object); |
13343 } | 13344 } |
13344 | 13345 |
13345 | 13346 |
13346 String* SharedFunctionInfo::DebugName() { | 13347 String* SharedFunctionInfo::DebugName() { |
13347 Object* n = name(); | 13348 Object* n = name(); |
13348 if (!n->IsString() || String::cast(n)->length() == 0) return inferred_name(); | 13349 if (!n->IsString() || String::cast(n)->length() == 0) return inferred_name(); |
13349 return String::cast(n); | 13350 return String::cast(n); |
13350 } | 13351 } |
13351 | 13352 |
| 13353 bool SharedFunctionInfo::HasNoSideEffect() { |
| 13354 if (!computed_has_no_side_effect()) { |
| 13355 DisallowHeapAllocation not_handlified; |
| 13356 Handle<SharedFunctionInfo> info(this); |
| 13357 set_has_no_side_effect(DebugEvaluate::FunctionHasNoSideEffect(info)); |
| 13358 set_computed_has_no_side_effect(true); |
| 13359 } |
| 13360 return has_no_side_effect(); |
| 13361 } |
| 13362 |
13352 // The filter is a pattern that matches function names in this way: | 13363 // The filter is a pattern that matches function names in this way: |
13353 // "*" all; the default | 13364 // "*" all; the default |
13354 // "-" all but the top-level function | 13365 // "-" all but the top-level function |
13355 // "-name" all but the function "name" | 13366 // "-name" all but the function "name" |
13356 // "" only the top-level function | 13367 // "" only the top-level function |
13357 // "name" only the function "name" | 13368 // "name" only the function "name" |
13358 // "name*" only functions starting with "name" | 13369 // "name*" only functions starting with "name" |
13359 // "~" none; the tilde is not an identifier | 13370 // "~" none; the tilde is not an identifier |
13360 bool SharedFunctionInfo::PassesFilter(const char* raw_filter) { | 13371 bool SharedFunctionInfo::PassesFilter(const char* raw_filter) { |
13361 if (*raw_filter == '*') return true; | 13372 if (*raw_filter == '*') return true; |
(...skipping 6591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19953 // depend on this. | 19964 // depend on this. |
19954 return DICTIONARY_ELEMENTS; | 19965 return DICTIONARY_ELEMENTS; |
19955 } | 19966 } |
19956 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 19967 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
19957 return kind; | 19968 return kind; |
19958 } | 19969 } |
19959 } | 19970 } |
19960 | 19971 |
19961 } // namespace internal | 19972 } // namespace internal |
19962 } // namespace v8 | 19973 } // namespace v8 |
OLD | NEW |