> > > > Would it be better to rename the methods that can > > cause GC rather than placing them into a different facade class? > > It may be better in general, but I think such refactorings are beyond > the scope of the branch (unless they simplify something significantly > for us, which is not the case here). Still the way it's done in this > patch is very confusing. Having AllocateFoo and NewFoo in a single > class, where the first one returns a raw pointer and the second one > may cause GC and returns a handle, could be dangerous. With a more > consistent naming scheme (e.g. having "Raw" prefix for raw functions: > "RawNewFoo" and "NewFoo") it might work.
How about GC as a prefix for methods that may cause garbage collection (GCNewFoo; GCNumberToStringHandle; GCCreateApiFunction)? Accessors for handles would stay the same (foo_handle(), bar_symbol_handle()). -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
