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

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

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 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/runtime/runtime-debug.cc ('k') | src/runtime/runtime-i18n.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 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 target_shared->set_compiler_hints(source_shared->compiler_hints()); 198 target_shared->set_compiler_hints(source_shared->compiler_hints());
199 target_shared->set_opt_count_and_bailout_reason( 199 target_shared->set_opt_count_and_bailout_reason(
200 source_shared->opt_count_and_bailout_reason()); 200 source_shared->opt_count_and_bailout_reason());
201 target_shared->set_native(was_native); 201 target_shared->set_native(was_native);
202 target_shared->set_profiler_ticks(source_shared->profiler_ticks()); 202 target_shared->set_profiler_ticks(source_shared->profiler_ticks());
203 SharedFunctionInfo::SetScript( 203 SharedFunctionInfo::SetScript(
204 target_shared, Handle<Object>(source_shared->script(), isolate)); 204 target_shared, Handle<Object>(source_shared->script(), isolate));
205 205
206 // Set the code of the target function. 206 // Set the code of the target function.
207 target->ReplaceCode(source_shared->code()); 207 target->ReplaceCode(source_shared->code());
208 DCHECK(target->next_function_link()->IsUndefined()); 208 DCHECK(target->next_function_link()->IsUndefined(isolate));
209 209
210 Handle<Context> context(source->context()); 210 Handle<Context> context(source->context());
211 target->set_context(*context); 211 target->set_context(*context);
212 212
213 // Make sure we get a fresh copy of the literal vector to avoid cross 213 // Make sure we get a fresh copy of the literal vector to avoid cross
214 // context contamination, and that the literal vector makes it's way into 214 // context contamination, and that the literal vector makes it's way into
215 // the target_shared optimized code map. 215 // the target_shared optimized code map.
216 JSFunction::EnsureLiterals(target); 216 JSFunction::EnsureLiterals(target);
217 217
218 if (isolate->logger()->is_logging_code_events() || 218 if (isolate->logger()->is_logging_code_events() ||
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 DCHECK_EQ(1, args.length()); 299 DCHECK_EQ(1, args.length());
300 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); 300 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0);
301 return function->IsJSBoundFunction() 301 return function->IsJSBoundFunction()
302 ? *JSBoundFunction::ToString( 302 ? *JSBoundFunction::ToString(
303 Handle<JSBoundFunction>::cast(function)) 303 Handle<JSBoundFunction>::cast(function))
304 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); 304 : *JSFunction::ToString(Handle<JSFunction>::cast(function));
305 } 305 }
306 306
307 } // namespace internal 307 } // namespace internal
308 } // namespace v8 308 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/runtime/runtime-i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698