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

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

Issue 2629113004: Revert of [runtime] Change JavaScriptFrame::GetFunctions interface. (Closed)
Patch Set: Created 3 years, 11 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-profiler.cc ('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/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
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<SharedFunctionInfo*> functions(2); 356 List<JSFunction*> 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { 979 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) {
980 HandleScope scope(isolate); 980 HandleScope scope(isolate);
981 DCHECK_EQ(2, args.length()); 981 DCHECK_EQ(2, args.length());
982 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); 982 CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
983 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); 983 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
984 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); 984 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT));
985 } 985 }
986 986
987 } // namespace internal 987 } // namespace internal
988 } // namespace v8 988 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime-profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698