Last Comment Bug 692911 - js::types::TypeConstraintSubsetBarrier::newType makes useless call to target->addType
: js::types::TypeConstraintSubsetBarrier::newType makes useless call to target-...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla10
Assigned To: Jim Blandy :jimb
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-07 13:17 PDT by Jim Blandy :jimb
Modified: 2011-10-25 02:49 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Delete useless call to target->addType in js::types::TypeConstraintSubsetBarrier::newType. (658 bytes, patch)
2011-10-07 13:17 PDT, Jim Blandy :jimb
bhackett1024: review+
Details | Diff | Review
Delete useless call to target->addType in js::types::TypeConstraintSubsetBarrier::newType. (805 bytes, patch)
2011-10-07 13:20 PDT, Jim Blandy :jimb
bhackett1024: review+
Details | Diff | Review

Description Jim Blandy :jimb 2011-10-07 13:17:47 PDT
Created attachment 565630 [details] [diff] [review]
Delete useless call to target->addType in js::types::TypeConstraintSubsetBarrier::newType.

js::types::TypeConstraintSubsetBarrier::newType calls 'target->hasType(type)', and if that returns true, calls 'target->addType(cx, type)'. That second call should have no effect: it just adds to target a type that it already has.

The call to target->addType should be deleted.

The attached patch causes no regressions in jit-test and js-tests on Linux in DEBUG mode.
Comment 1 Jim Blandy :jimb 2011-10-07 13:20:02 PDT
Created attachment 565633 [details] [diff] [review]
Delete useless call to target->addType in js::types::TypeConstraintSubsetBarrier::newType.

Trivial revision to patch, to clean things up a bit better.
Comment 3 Kyle Huey [:khuey] (khuey@mozilla.com) 2011-10-09 07:33:08 PDT
https://hg.mozilla.org/mozilla-central/rev/6576946586f4

Note You need to log in before you can comment on or make changes to this bug.