| OLD | NEW |
| 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 <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 | 455 |
| 456 RETURN_RESULT_OR_FAILURE( | 456 RETURN_RESULT_OR_FAILURE( |
| 457 isolate, | 457 isolate, |
| 458 StoreKeyedToSuper(isolate, home_object, receiver, key, value, SLOPPY)); | 458 StoreKeyedToSuper(isolate, home_object, receiver, key, value, SLOPPY)); |
| 459 } | 459 } |
| 460 | 460 |
| 461 | 461 |
| 462 RUNTIME_FUNCTION(Runtime_GetSuperConstructor) { | 462 RUNTIME_FUNCTION(Runtime_GetSuperConstructor) { |
| 463 SealHandleScope shs(isolate); | 463 SealHandleScope shs(isolate); |
| 464 DCHECK_EQ(1, args.length()); | 464 DCHECK_EQ(1, args.length()); |
| 465 CONVERT_ARG_HANDLE_CHECKED(JSFunction, active_function, 0); | 465 CONVERT_ARG_CHECKED(JSFunction, active_function, 0); |
| 466 Object* prototype = active_function->map()->prototype(); | 466 Object* prototype = active_function->map()->prototype(); |
| 467 if (!prototype->IsConstructor()) { | 467 if (!prototype->IsConstructor()) { |
| 468 return ThrowNotSuperConstructor( | 468 HandleScope scope(isolate); |
| 469 isolate, Handle<JSFunction>::cast(handle(prototype, isolate)), | 469 return ThrowNotSuperConstructor(isolate, handle(prototype, isolate), |
| 470 active_function); | 470 handle(active_function, isolate)); |
| 471 } | 471 } |
| 472 return prototype; | 472 return prototype; |
| 473 } | 473 } |
| 474 | 474 |
| 475 RUNTIME_FUNCTION(Runtime_NewWithSpread) { | 475 RUNTIME_FUNCTION(Runtime_NewWithSpread) { |
| 476 HandleScope scope(isolate); | 476 HandleScope scope(isolate); |
| 477 DCHECK_LE(3, args.length()); | 477 DCHECK_LE(3, args.length()); |
| 478 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, constructor, 0); | 478 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, constructor, 0); |
| 479 CONVERT_ARG_HANDLE_CHECKED(Object, new_target, 1); | 479 CONVERT_ARG_HANDLE_CHECKED(Object, new_target, 1); |
| 480 | 480 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 510 } | 510 } |
| 511 | 511 |
| 512 // Call the constructor. | 512 // Call the constructor. |
| 513 RETURN_RESULT_OR_FAILURE( | 513 RETURN_RESULT_OR_FAILURE( |
| 514 isolate, Execution::New(isolate, constructor, new_target, result_length, | 514 isolate, Execution::New(isolate, constructor, new_target, result_length, |
| 515 construct_args.start())); | 515 construct_args.start())); |
| 516 } | 516 } |
| 517 | 517 |
| 518 } // namespace internal | 518 } // namespace internal |
| 519 } // namespace v8 | 519 } // namespace v8 |
| OLD | NEW |