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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 346 |
347 namespace { | 347 namespace { |
348 | 348 |
349 // Find the arguments of the JavaScript function invocation that called | 349 // Find the arguments of the JavaScript function invocation that called |
350 // into C++ code. Collect these in a newly allocated array of handles. | 350 // into C++ code. Collect these in a newly allocated array of handles. |
351 std::unique_ptr<Handle<Object>[]> GetCallerArguments(Isolate* isolate, | 351 std::unique_ptr<Handle<Object>[]> GetCallerArguments(Isolate* isolate, |
352 int* total_argc) { | 352 int* total_argc) { |
353 // Find frame containing arguments passed to the caller. | 353 // Find frame containing arguments passed to the caller. |
354 JavaScriptFrameIterator it(isolate); | 354 JavaScriptFrameIterator it(isolate); |
355 JavaScriptFrame* frame = it.frame(); | 355 JavaScriptFrame* frame = it.frame(); |
356 List<JSFunction*> functions(2); | 356 List<SharedFunctionInfo*> functions(2); |
357 frame->GetFunctions(&functions); | 357 frame->GetFunctions(&functions); |
358 if (functions.length() > 1) { | 358 if (functions.length() > 1) { |
359 int inlined_jsframe_index = functions.length() - 1; | 359 int inlined_jsframe_index = functions.length() - 1; |
360 TranslatedState translated_values(frame); | 360 TranslatedState translated_values(frame); |
361 translated_values.Prepare(false, frame->fp()); | 361 translated_values.Prepare(false, frame->fp()); |
362 | 362 |
363 int argument_count = 0; | 363 int argument_count = 0; |
364 TranslatedFrame* translated_frame = | 364 TranslatedFrame* translated_frame = |
365 translated_values.GetArgumentsInfoFromJSFrameIndex( | 365 translated_values.GetArgumentsInfoFromJSFrameIndex( |
366 inlined_jsframe_index, &argument_count); | 366 inlined_jsframe_index, &argument_count); |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { | 989 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { |
990 HandleScope scope(isolate); | 990 HandleScope scope(isolate); |
991 DCHECK_EQ(2, args.length()); | 991 DCHECK_EQ(2, args.length()); |
992 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); | 992 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
993 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 993 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
994 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); | 994 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); |
995 } | 995 } |
996 | 996 |
997 } // namespace internal | 997 } // namespace internal |
998 } // namespace v8 | 998 } // namespace v8 |
OLD | NEW |