Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for makeArgSlices (0.15 sec)

  1. src/syscall/js/js.go

    func valueSetIndex(v ref, i int, x ref)
    
    // makeArgSlices makes two slices to hold JavaScript arg data.
    // It can be paired with storeArgs to make-and-store JavaScript arg slices.
    // However, the two functions are separated to ensure makeArgSlices is inlined
    // which will prevent the slices from being heap allocated for small (<=16)
    // numbers of args.
    func makeArgSlices(size int) (argVals []Value, argRefs []ref) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 14:35:26 UTC 2024
    - 19.5K bytes
    - Viewed (0)
  2. src/syscall/js/js_test.go

    	// - makeValue new(ref)
    	{0,  1},
    	{2,  1},
    	{15, 1},
    	{16, 1},
    	// For greater than 16 arguments, we expect 3 alloction:
    	// - makeValue: new(ref)
    	// - makeArgSlices: argVals = make([]Value, size)
    	// - makeArgSlices: argRefs = make([]ref, size)
    	{17, 3},
    	{32, 3},
    	{42, 3},
    }
    
    // TestCallAllocations ensures the correct allocation profile for Value.Call
    func TestCallAllocations(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 14:35:26 UTC 2024
    - 17.7K bytes
    - Viewed (0)
Back to top