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

Side by Side Diff: src/debug/liveedit.cc

Issue 2244673002: [regexp][liveedit] Fix inconsistent JSArrays (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698