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

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

Issue 1970503004: [wasm] Differentiate unnamed and empty names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@add-utf8-check
Patch Set: Yang's last comments Created 4 years, 7 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') | src/wasm/wasm-function-name-table.h » ('j') | 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 "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 RUNTIME_FUNCTION(Runtime_FunctionToString) { 304 RUNTIME_FUNCTION(Runtime_FunctionToString) {
305 HandleScope scope(isolate); 305 HandleScope scope(isolate);
306 DCHECK_EQ(1, args.length()); 306 DCHECK_EQ(1, args.length());
307 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); 307 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0);
308 return function->IsJSBoundFunction() 308 return function->IsJSBoundFunction()
309 ? *JSBoundFunction::ToString( 309 ? *JSBoundFunction::ToString(
310 Handle<JSBoundFunction>::cast(function)) 310 Handle<JSBoundFunction>::cast(function))
311 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); 311 : *JSFunction::ToString(Handle<JSFunction>::cast(function));
312 } 312 }
313 313
314 RUNTIME_FUNCTION(Runtime_WasmGetFunctionName) {
315 HandleScope scope(isolate);
316 DCHECK_EQ(2, args.length());
317
318 CONVERT_ARG_HANDLE_CHECKED(JSObject, wasm, 0);
319 CONVERT_SMI_ARG_CHECKED(func_index, 1);
320
321 return *wasm::GetWasmFunctionName(wasm, func_index);
322 }
323
324 } // namespace internal 314 } // namespace internal
325 } // namespace v8 315 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/wasm/wasm-function-name-table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698