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

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

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing wrongly wrapped lines 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
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/arguments.h" 7 #include "src/arguments.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/conversions-inl.h" 9 #include "src/conversions-inl.h"
10 #include "src/elements.h" 10 #include "src/elements.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 Handle<AllocationSite>::null(), caller_args); 392 Handle<AllocationSite>::null(), caller_args);
393 } 393 }
394 394
395 RUNTIME_FUNCTION(Runtime_ArraySingleArgumentConstructor) { 395 RUNTIME_FUNCTION(Runtime_ArraySingleArgumentConstructor) {
396 HandleScope scope(isolate); 396 HandleScope scope(isolate);
397 CONVERT_ARG_HANDLE_CHECKED(JSFunction, constructor, 0); 397 CONVERT_ARG_HANDLE_CHECKED(JSFunction, constructor, 0);
398 Object** argument_base = reinterpret_cast<Object**>(args[1]); 398 Object** argument_base = reinterpret_cast<Object**>(args[1]);
399 CONVERT_SMI_ARG_CHECKED(argument_count, 2); 399 CONVERT_SMI_ARG_CHECKED(argument_count, 2);
400 CONVERT_ARG_HANDLE_CHECKED(Object, raw_site, 3); 400 CONVERT_ARG_HANDLE_CHECKED(Object, raw_site, 3);
401 Handle<AllocationSite> casted_site = 401 Handle<AllocationSite> casted_site =
402 raw_site->IsUndefined() ? Handle<AllocationSite>::null() 402 raw_site->IsUndefined(isolate) ? Handle<AllocationSite>::null()
403 : Handle<AllocationSite>::cast(raw_site); 403 : Handle<AllocationSite>::cast(raw_site);
404 Arguments constructor_args(argument_count, argument_base); 404 Arguments constructor_args(argument_count, argument_base);
405 return ArrayConstructorCommon(isolate, constructor, constructor, casted_site, 405 return ArrayConstructorCommon(isolate, constructor, constructor, casted_site,
406 &constructor_args); 406 &constructor_args);
407 } 407 }
408 408
409 RUNTIME_FUNCTION(Runtime_NormalizeElements) { 409 RUNTIME_FUNCTION(Runtime_NormalizeElements) {
410 HandleScope scope(isolate); 410 HandleScope scope(isolate);
411 DCHECK(args.length() == 1); 411 DCHECK(args.length() == 1);
412 CONVERT_ARG_HANDLE_CHECKED(JSObject, array, 0); 412 CONVERT_ARG_HANDLE_CHECKED(JSObject, array, 0);
413 RUNTIME_ASSERT(!array->HasFixedTypedArrayElements() && 413 RUNTIME_ASSERT(!array->HasFixedTypedArrayElements() &&
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 RUNTIME_FUNCTION(Runtime_ArraySpeciesConstructor) { 504 RUNTIME_FUNCTION(Runtime_ArraySpeciesConstructor) {
505 HandleScope scope(isolate); 505 HandleScope scope(isolate);
506 DCHECK(args.length() == 1); 506 DCHECK(args.length() == 1);
507 CONVERT_ARG_HANDLE_CHECKED(Object, original_array, 0); 507 CONVERT_ARG_HANDLE_CHECKED(Object, original_array, 0);
508 RETURN_RESULT_OR_FAILURE( 508 RETURN_RESULT_OR_FAILURE(
509 isolate, Object::ArraySpeciesConstructor(isolate, original_array)); 509 isolate, Object::ArraySpeciesConstructor(isolate, original_array));
510 } 510 }
511 511
512 } // namespace internal 512 } // namespace internal
513 } // namespace v8 513 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698