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

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

Issue 2227763003: [turbofan] Rewrite ToObject as TurboFan stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Revert "Delete hydrogen toObject" 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/runtime/runtime.h ('k') | no next file » | 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 <memory> 7 #include <memory>
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 459
460 RUNTIME_FUNCTION(Runtime_ThrowConstructedNonConstructable) { 460 RUNTIME_FUNCTION(Runtime_ThrowConstructedNonConstructable) {
461 HandleScope scope(isolate); 461 HandleScope scope(isolate);
462 DCHECK_EQ(1, args.length()); 462 DCHECK_EQ(1, args.length());
463 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 463 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
464 Handle<String> callsite = RenderCallSite(isolate, object); 464 Handle<String> callsite = RenderCallSite(isolate, object);
465 THROW_NEW_ERROR_RETURN_FAILURE( 465 THROW_NEW_ERROR_RETURN_FAILURE(
466 isolate, NewTypeError(MessageTemplate::kNotConstructor, callsite)); 466 isolate, NewTypeError(MessageTemplate::kNotConstructor, callsite));
467 } 467 }
468 468
469
470 RUNTIME_FUNCTION(Runtime_ThrowDerivedConstructorReturnedNonObject) { 469 RUNTIME_FUNCTION(Runtime_ThrowDerivedConstructorReturnedNonObject) {
471 HandleScope scope(isolate); 470 HandleScope scope(isolate);
472 DCHECK_EQ(0, args.length()); 471 DCHECK_EQ(0, args.length());
473 THROW_NEW_ERROR_RETURN_FAILURE( 472 THROW_NEW_ERROR_RETURN_FAILURE(
474 isolate, NewTypeError(MessageTemplate::kDerivedConstructorReturn)); 473 isolate, NewTypeError(MessageTemplate::kDerivedConstructorReturn));
475 } 474 }
476 475
476 RUNTIME_FUNCTION(Runtime_ThrowUndefinedOrNullToObject) {
477 HandleScope scope(isolate);
478 DCHECK_EQ(1, args.length());
479 CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
480 THROW_NEW_ERROR_RETURN_FAILURE(
481 isolate, NewTypeError(MessageTemplate::kUndefinedOrNullToObject, name));
482 }
477 483
478 // ES6 section 7.3.17 CreateListFromArrayLike (obj) 484 // ES6 section 7.3.17 CreateListFromArrayLike (obj)
479 RUNTIME_FUNCTION(Runtime_CreateListFromArrayLike) { 485 RUNTIME_FUNCTION(Runtime_CreateListFromArrayLike) {
480 HandleScope scope(isolate); 486 HandleScope scope(isolate);
481 DCHECK_EQ(1, args.length()); 487 DCHECK_EQ(1, args.length());
482 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 488 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
483 RETURN_RESULT_OR_FAILURE(isolate, Object::CreateListFromArrayLike( 489 RETURN_RESULT_OR_FAILURE(isolate, Object::CreateListFromArrayLike(
484 isolate, object, ElementTypes::kAll)); 490 isolate, object, ElementTypes::kAll));
485 } 491 }
486 492
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 580
575 RUNTIME_FUNCTION(Runtime_Typeof) { 581 RUNTIME_FUNCTION(Runtime_Typeof) {
576 HandleScope scope(isolate); 582 HandleScope scope(isolate);
577 DCHECK_EQ(1, args.length()); 583 DCHECK_EQ(1, args.length());
578 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 584 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
579 return *Object::TypeOf(isolate, object); 585 return *Object::TypeOf(isolate, object);
580 } 586 }
581 587
582 } // namespace internal 588 } // namespace internal
583 } // namespace v8 589 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698