Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  monomorphic-inlining.js

  Sprache: JAVA
 

// |jit-test| --ion-offthread-compile=off;

function foo(f, a, b) {
  return f(a, b);
}

function bar(a, b) {
  let result = a + b;
  if (result >= fns.length) {
    return b + a;
  }
  return result;
}

function baz(a, b) {
  return a + b;
}

let fns = [];

// This is pretty fiddly. What we are trying to test here is a specific path
// in the bailout code which needs to know which ICScript to load, and has to
// decide between the script's own ICScript, or the trial-inlined ICScript
// which belongs to the outer script. It uses the ICFallbackStub's
// trialInliningState to make this decision, which can change out from
// underneath us if the inlined call fails. So what were doing here is getting
// into a state where we've monomorphic inlined a function, and gone to Ion
// with it. We then cause the inlined call to fail by calling a function which
// doesn't match what we expect, which transitions us to a failed
// trialInliningState. We then will bail out *inside* bar, due to the
// previously unseen inside of the result >= fns.length check, exercising the
// bailout code in question.
for (let i = 0; i < 2000; i++) {
  fns.push(bar);
}

fns.push(baz);
fns.push(bar);

for (let i = 0; i < fns.length; i++) {
  assertEq(foo(fns[i], i, 1), i + 1);
}

Messung V0.5 in Prozent
C=96 H=83 G=89

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik