Ticket #127 (closed todo: invalid)

Opened 13 years ago

Last modified 13 years ago

do not stat extensions when an extension was already given

Reported by: rurban Owned by: rurban
Priority: minor Milestone:
Component: core Version: branch
Severity: low Keywords: pdd30install
Cc: Language:
Patch status: applied Platform: all

Description (last modified by rurban) (diff)

See TT#126 and TT#123

src/library.c:

Optimization for stats for library files with given extensions, so that stat("library/Stream/Sub.pir.pasm") and so on for .pbc, .pasm, .pir should not happen.

load_bytecode "library/Stream/Sub.pir" should not search for "Sub.pir.pbc", "Sub.pir.pasm", and "Sub.pir.pir"

So if the file already ends with ".pir", ".pasm" or ".pbc" do not try to append extensions.

Attachments

r34932-rt56996+tt127.diff Download (15.2 KB) - added by rurban 13 years ago.

Change History

Changed 13 years ago by rurban

Also: If the given string is a directory, do not fail, try the extensions instead. e.g. load_bytecode 'Test/Builder'

Changed 13 years ago by rurban

The fix for the directory problem is simple.

try_load_path() is a bad name. It also finds directories, but it should not. It should only find files or symlinks.

I'll add that check to the stat and rename it to try_load_file(). It is only used in src/library.c

Changed 13 years ago by rurban

Changed 13 years ago by rurban

Added as r34932 in pdd30install_stage3  http://www.parrotvm.org/svn/parrot/revision?rev=34932

Changed 13 years ago by rurban

  • owner set to rurban
  • patch set to applied

Changed 13 years ago by rurban

  • version set to branch

Another minor MSWin32 fix for the test was added with r34939 Thanks to Ronald Blaschke

Changed 13 years ago by rurban

  • status changed from new to assigned
  • component changed from none to core
  • description modified (diff)

Changed 13 years ago by jkeenan

  • status changed from assigned to closed
  • resolution set to invalid

The  paste is no longer available. Nor is the pdd30install_stage3 branch. We don't have a t/src/library.t in trunk.

So I think this ticket is either superseded or defunct. Closing.

Changed 13 years ago by rurban

Note: See TracTickets for help on using tickets.