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

Side by Side Diff: src/runtime/runtime-function.cc

Issue 1730853005: [interpreter] Make setting of function data more resilient. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-test-enable-strong
Patch Set: Addressed comments. Created 4 years, 10 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // shared unoptimized code makes them impossible to enqueue in a list. 161 // shared unoptimized code makes them impossible to enqueue in a list.
162 DCHECK(target_shared->code()->gc_metadata() == NULL); 162 DCHECK(target_shared->code()->gc_metadata() == NULL);
163 DCHECK(source_shared->code()->gc_metadata() == NULL); 163 DCHECK(source_shared->code()->gc_metadata() == NULL);
164 target_shared->set_dont_flush(true); 164 target_shared->set_dont_flush(true);
165 source_shared->set_dont_flush(true); 165 source_shared->set_dont_flush(true);
166 166
167 // Set the code, scope info, formal parameter count, and the length 167 // Set the code, scope info, formal parameter count, and the length
168 // of the target shared function info. 168 // of the target shared function info.
169 target_shared->ReplaceCode(source_shared->code()); 169 target_shared->ReplaceCode(source_shared->code());
170 if (source_shared->HasBytecodeArray()) { 170 if (source_shared->HasBytecodeArray()) {
171 target_shared->set_function_data(source_shared->bytecode_array()); 171 target_shared->set_bytecode_array(source_shared->bytecode_array());
172 } 172 }
173 target_shared->set_scope_info(source_shared->scope_info()); 173 target_shared->set_scope_info(source_shared->scope_info());
174 target_shared->set_length(source_shared->length()); 174 target_shared->set_length(source_shared->length());
175 target_shared->set_feedback_vector(source_shared->feedback_vector()); 175 target_shared->set_feedback_vector(source_shared->feedback_vector());
176 target_shared->set_internal_formal_parameter_count( 176 target_shared->set_internal_formal_parameter_count(
177 source_shared->internal_formal_parameter_count()); 177 source_shared->internal_formal_parameter_count());
178 target_shared->set_start_position_and_type( 178 target_shared->set_start_position_and_type(
179 source_shared->start_position_and_type()); 179 source_shared->start_position_and_type());
180 target_shared->set_end_position(source_shared->end_position()); 180 target_shared->set_end_position(source_shared->end_position());
181 bool was_native = target_shared->native(); 181 bool was_native = target_shared->native();
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 DCHECK_EQ(1, args.length()); 355 DCHECK_EQ(1, args.length());
356 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); 356 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0);
357 return function->IsJSBoundFunction() 357 return function->IsJSBoundFunction()
358 ? *JSBoundFunction::ToString( 358 ? *JSBoundFunction::ToString(
359 Handle<JSBoundFunction>::cast(function)) 359 Handle<JSBoundFunction>::cast(function))
360 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); 360 : *JSFunction::ToString(Handle<JSFunction>::cast(function));
361 } 361 }
362 362
363 } // namespace internal 363 } // namespace internal
364 } // namespace v8 364 } // namespace v8
OLDNEW
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698