Closed
Bug 1266695
Opened 8 years ago
Closed 8 years ago
Port typed object getprop stub to CacheIR
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
22.58 KB,
patch
|
efaust
:
review+
|
Details | Diff | Splinter Review |
Loading from a typed object is a bit involved, but it still gets rid of some boilerplate: 7 files changed, 150 insertions(+), 188 deletions(-)
Attachment #8744278 -
Flags: review?(efaustbmo)
Comment 1•8 years ago
|
||
Comment on attachment 8744278 [details] [diff] [review] Patch Review of attachment 8744278 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jit/BaselineCacheIR.cpp @@ +877,5 @@ > +BaselineCacheIRCompiler::emitLoadTypedObjectResult() > +{ > + Register obj = allocator.useRegister(masm, reader.objOperandId()); > + AutoScratchRegister scratch1(allocator, masm); > + AutoScratchRegister scratch2(allocator, masm); These two read very similarly, which makes them hard to disambiguate below. Maybe call scratch1 "fieldBase", or something? That's still not great for the load usage below... In general, as an aside, I wish there was a way to do scoped register aliasing, so that you could do { AutoNamedRegister name(scratchReg); // direct references to scratchReg crash in this block } or something similar. Then we could do what BC loves doing, which is { Register name = scratch; } but without the fear of smashing ourselves. @@ +925,5 @@ > + masm.tagValue(JSVAL_TYPE_STRING, scratch1, R0); > + break; > + > + default: > + MOZ_CRASH(); please add a string here: "unknown ReferenceTypeDescr" or so
Attachment #8744278 -
Flags: review?(efaustbmo) → review+
Assignee | ||
Comment 3•8 years ago
|
||
(In reply to Eric Faust [:efaust] from comment #1) > These two read very similarly, which makes them hard to disambiguate below. > > Maybe call scratch1 "fieldBase", or something? That's still not great for > the load usage below... Yeah I don't think renaming makes it much clearer as they're used multiple times.. > In general, as an aside, I wish there was a way to do scoped register > aliasing, so that you could do The MacroAssemblers have a ScratchRegisterScope, we could do something like that. CacheIR helps a lot with scratch register allocation though. > please add a string here: "unknown ReferenceTypeDescr" or so Done.
Comment 4•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3996d3dd01ad
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•