npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

trace-inline-parse

v1.0.1

Published

Parser of --trace-inlining output

Downloads

3

Readme

trace-inline-parse Build Status npm license downloads

Parser of --trace-inlining output from Crankshaft

example output from Crankshaft

Inlining builtin 000002F5B86C1BE9 <JS Function charCodeAt (SharedFunctionInfo 000002F5B8657279)>
Inlined isNaN called from adjustOffset.
Inlined get length called from slice.
Did not inline parse_int called from next_str (target text too big).

Usage

const parser = require('trace-inline-parse')

console.log(parser('Inlined isNaN called from adjustOffset.'))
/*
{
  target: {
    name: 'isNaN',
    accessor: false
  },
  caller: {
    name: 'adjustOffset',
    accessor: false
  },
  type: 'func',
  inlined: true,
  tailcall: false
}
*/

console.log(parser('Did not inline get foo called from (target text too big).'))
/*
{
  target: {
    name: 'foo',
    accessor: 'get'
  },
  caller: false,
  type: 'func',
  inlined: false,
  reason: 'target text too big'
}
*/
console.log(parser('Inlining builtin 000002F5B86C1BE9 <JS Function charCodeAt (SharedFunctionInfo 000002F5B8657279)>'))
/*
{
  target: {
    name: 'charCodeAt',
    accessor: false
  },
  caller: false,
  type: 'native',
  inlined: true,
  place: 'builtin',
  address: '000002F5B86C1BE9'
}
*/

API

parser(line: string): Node|undefined

Parse a line and return Node object.

Node

target: FUNC_NODE | false

processed function; equals false if function name is empty

caller: FUNC_NODE | false

parent function; equals false if function name is empty

type: 'func' | 'native'

type of processed function: 'func' for plain js functions, 'native' for any native functions

inlined: bool

Is node inlined or not?

tailcall: bool

Was function tail call optimized or not?

place: 'api' | 'builtin'

place of native inlined function: builtin for any internal V8 functions, api for any native nodejs function

address: string

address of native function

reason: string

why function wasn't inlined?

FUNC_NODE

name: string

Name of function

accessor: bool

get for getters, set for setters, false for any other functions

License

MIT, 2017 (c) Dmitry Tsvettsikh