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 13892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13933 shared->set_script(*script_object); | 13934 shared->set_script(*script_object); |
13934 } | 13935 } |
13935 | 13936 |
13936 | 13937 |
13937 String* SharedFunctionInfo::DebugName() { | 13938 String* SharedFunctionInfo::DebugName() { |
13938 Object* n = name(); | 13939 Object* n = name(); |
13939 if (!n->IsString() || String::cast(n)->length() == 0) return inferred_name(); | 13940 if (!n->IsString() || String::cast(n)->length() == 0) return inferred_name(); |
13940 return String::cast(n); | 13941 return String::cast(n); |
13941 } | 13942 } |
13942 | 13943 |
| 13944 bool SharedFunctionInfo::HasNoSideEffect() { |
| 13945 if (!computed_has_no_side_effect()) { |
| 13946 DisallowHeapAllocation not_handlified; |
| 13947 Handle<SharedFunctionInfo> info(this); |
| 13948 set_has_no_side_effect(DebugEvaluate::FunctionHasNoSideEffect(info)); |
| 13949 set_computed_has_no_side_effect(true); |
| 13950 } |
| 13951 return has_no_side_effect(); |
| 13952 } |
| 13953 |
13943 // The filter is a pattern that matches function names in this way: | 13954 // The filter is a pattern that matches function names in this way: |
13944 // "*" all; the default | 13955 // "*" all; the default |
13945 // "-" all but the top-level function | 13956 // "-" all but the top-level function |
13946 // "-name" all but the function "name" | 13957 // "-name" all but the function "name" |
13947 // "" only the top-level function | 13958 // "" only the top-level function |
13948 // "name" only the function "name" | 13959 // "name" only the function "name" |
13949 // "name*" only functions starting with "name" | 13960 // "name*" only functions starting with "name" |
13950 // "~" none; the tilde is not an identifier | 13961 // "~" none; the tilde is not an identifier |
13951 bool SharedFunctionInfo::PassesFilter(const char* raw_filter) { | 13962 bool SharedFunctionInfo::PassesFilter(const char* raw_filter) { |
13952 if (*raw_filter == '*') return true; | 13963 if (*raw_filter == '*') return true; |
(...skipping 6538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20491 // depend on this. | 20502 // depend on this. |
20492 return DICTIONARY_ELEMENTS; | 20503 return DICTIONARY_ELEMENTS; |
20493 } | 20504 } |
20494 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20505 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20495 return kind; | 20506 return kind; |
20496 } | 20507 } |
20497 } | 20508 } |
20498 | 20509 |
20499 } // namespace internal | 20510 } // namespace internal |
20500 } // namespace v8 | 20511 } // namespace v8 |
OLD | NEW |