Permalink
Browse files

StackTrace metamodule naming optimisation, pulled from compiler branch.

  • Loading branch information...
1 parent 0914f67 commit 34dd76410b4aad7d7ac20d4589abcd14a5335c3e @jcoglan jcoglan committed Sep 13, 2008
Showing with 5 additions and 3 deletions.
  1. +5 −3 source/stack_trace.js
View
@@ -30,9 +30,11 @@ JS.StackTrace = new JS.Module({
l += 1;
field = this.descend(field, object);
}
- object.__name__ = (typeof field === 'string')
- ? field.replace(/\.prototype\./g, '#')
- : undefined;
+ if (typeof field == 'string') {
+ field = field.replace(/\.prototype\./g, '#');
+ object.__name__ = field;
+ if (object.__meta__) object.__meta__.__name__ = field + '.__meta__';
+ }
return object.__name__;
},

0 comments on commit 34dd764

Please sign in to comment.