| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 Handle<Object> val = Handle<Object>(frame->GetParameter(i), isolate); | 403 Handle<Object> val = Handle<Object>(frame->GetParameter(i), isolate); |
| 404 param_data[i] = val; | 404 param_data[i] = val; |
| 405 } | 405 } |
| 406 return param_data; | 406 return param_data; |
| 407 } | 407 } |
| 408 } | 408 } |
| 409 | 409 |
| 410 template <typename T> | 410 template <typename T> |
| 411 Handle<JSObject> NewSloppyArguments(Isolate* isolate, Handle<JSFunction> callee, | 411 Handle<JSObject> NewSloppyArguments(Isolate* isolate, Handle<JSFunction> callee, |
| 412 T parameters, int argument_count) { | 412 T parameters, int argument_count) { |
| 413 CHECK(!IsSubclassConstructor(callee->shared()->kind())); | 413 CHECK(!IsDerivedConstructor(callee->shared()->kind())); |
| 414 DCHECK(callee->shared()->has_simple_parameters()); | 414 DCHECK(callee->shared()->has_simple_parameters()); |
| 415 Handle<JSObject> result = | 415 Handle<JSObject> result = |
| 416 isolate->factory()->NewArgumentsObject(callee, argument_count); | 416 isolate->factory()->NewArgumentsObject(callee, argument_count); |
| 417 | 417 |
| 418 // Allocate the elements if needed. | 418 // Allocate the elements if needed. |
| 419 int parameter_count = callee->shared()->internal_formal_parameter_count(); | 419 int parameter_count = callee->shared()->internal_formal_parameter_count(); |
| 420 if (argument_count > 0) { | 420 if (argument_count > 0) { |
| 421 if (parameter_count > 0) { | 421 if (parameter_count > 0) { |
| 422 int mapped_count = Min(argument_count, parameter_count); | 422 int mapped_count = Min(argument_count, parameter_count); |
| 423 Handle<FixedArray> parameter_map = | 423 Handle<FixedArray> parameter_map = |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { | 975 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { |
| 976 HandleScope scope(isolate); | 976 HandleScope scope(isolate); |
| 977 DCHECK_EQ(2, args.length()); | 977 DCHECK_EQ(2, args.length()); |
| 978 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); | 978 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
| 979 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 979 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
| 980 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); | 980 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); |
| 981 } | 981 } |
| 982 | 982 |
| 983 } // namespace internal | 983 } // namespace internal |
| 984 } // namespace v8 | 984 } // namespace v8 |
| OLD | NEW |