Ignore:
Timestamp:
Oct 1, 2009, 4:32:48 PM (16 years ago)
Author:
[email protected]
Message:

Take one branch instead of two to test for JSValue().

Patch by Geoffrey Garen <[email protected]> on 2009-10-01
Reviewed by Sam Weinig.

1.1% SunSpider speedup.

  • jit/JITCall.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_to_jsnumber):
(JSC::JIT::emit_op_create_arguments):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead
of testing for the cell tag with a 0 payload.

  • runtime/JSValue.cpp:

(JSC::JSValue::description): Added support for dumping the new empty value,
and deleted values, in debug builds.

  • runtime/JSValue.h:

(JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag.

(JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value
tag, to avoid having two different c++ versions of null / empty.

(JSC::JSValue::operator bool): Test for the empty value tag, instead
of testing for the cell tag with a 0 payload.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSValue.cpp

    r46598 r49004  
    123123    else if (isNull())
    124124        snprintf(description, size, "Null");
     125    else if (isUndefined())
     126        snprintf(description, size, "Undefined");
     127    else if (tag() == EmptyValueTag)
     128        snprintf(description, size, "<JSValue()>");
    125129    else {
    126         ASSERT(isUndefined());
    127         snprintf(description, size, "Undefined");
     130        ASSERT(tag() == DeletedValueTag);
     131        snprintf(description, size, "<HashTableDeletedValue>");
    128132    }
    129133
Note: See TracChangeset for help on using the changeset viewer.