OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/debug/liveedit.h" | 5 #include "src/debug/liveedit.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/compilation-cache.h" | 9 #include "src/compilation-cache.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1725 Handle<JSArray> old_shared_array, Handle<JSArray> new_shared_array, | 1725 Handle<JSArray> old_shared_array, Handle<JSArray> new_shared_array, |
1726 bool do_drop) { | 1726 bool do_drop) { |
1727 Isolate* isolate = old_shared_array->GetIsolate(); | 1727 Isolate* isolate = old_shared_array->GetIsolate(); |
1728 int len = GetArrayLength(old_shared_array); | 1728 int len = GetArrayLength(old_shared_array); |
1729 | 1729 |
1730 DCHECK(old_shared_array->HasFastElements()); | 1730 DCHECK(old_shared_array->HasFastElements()); |
1731 Handle<FixedArray> old_shared_array_elements( | 1731 Handle<FixedArray> old_shared_array_elements( |
1732 FixedArray::cast(old_shared_array->elements())); | 1732 FixedArray::cast(old_shared_array->elements())); |
1733 | 1733 |
1734 Handle<JSArray> result = isolate->factory()->NewJSArray(len); | 1734 Handle<JSArray> result = isolate->factory()->NewJSArray(len); |
| 1735 result->set_length(Smi::FromInt(len)); |
1735 JSObject::EnsureWritableFastElements(result); | 1736 JSObject::EnsureWritableFastElements(result); |
1736 Handle<FixedArray> result_elements = | 1737 Handle<FixedArray> result_elements = |
1737 handle(FixedArray::cast(result->elements()), isolate); | 1738 handle(FixedArray::cast(result->elements()), isolate); |
1738 | 1739 |
1739 // Fill the default values. | 1740 // Fill the default values. |
1740 for (int i = 0; i < len; i++) { | 1741 for (int i = 0; i < len; i++) { |
1741 FunctionPatchabilityStatus status = FUNCTION_AVAILABLE_FOR_PATCH; | 1742 FunctionPatchabilityStatus status = FUNCTION_AVAILABLE_FOR_PATCH; |
1742 result_elements->set(i, Smi::FromInt(status)); | 1743 result_elements->set(i, Smi::FromInt(status)); |
1743 } | 1744 } |
1744 | 1745 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1922 scope_info_length++; | 1923 scope_info_length++; |
1923 | 1924 |
1924 current_scope = current_scope->outer_scope(); | 1925 current_scope = current_scope->outer_scope(); |
1925 } | 1926 } |
1926 | 1927 |
1927 return scope_info_list; | 1928 return scope_info_list; |
1928 } | 1929 } |
1929 | 1930 |
1930 } // namespace internal | 1931 } // namespace internal |
1931 } // namespace v8 | 1932 } // namespace v8 |
OLD | NEW |