Ignore:
Timestamp:
Jul 22, 2008, 10:10:05 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-07-22 Geoffrey Garen <[email protected]>

Reviewed by Oliver Hunt and Sam Weinig.

Next step toward putting doubles in registers: Prepare the Register class
and its clients for registers that don't contain JSValue*s.


This means a few things:


  1. Register::jsValue() clients, including ArgList clients, must now supply an ExecState* when accessing an entry in an ArgList, in case the entry will need to create a JSValue* on the fly.


  1. Register clients that definitely don't want to create a JSValue* on the fly now use different APIs: getJSValue() for clients that know the register contains a JSValue*, and v() for clients who just want a void*.


  1. I had to change some headers around in order to resolve dependency problems created by using a Register in the ArgList header.


SunSpider reports no change.

JavaScriptGlue:

2008-07-22 Geoffrey Garen <[email protected]>

Reviewed by Oliver Hunt and Sam Weinig.

Next step toward putting doubles in registers: Prepare the Register class
and its clients for registers that don't contain JSValue*s.

WebCore:

2008-07-22 Geoffrey Garen <[email protected]>

Reviewed by Oliver Hunt and Sam Weinig.

Next step toward putting doubles in registers: Prepare the Register class
and its clients for registers that don't contain JSValue*s.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/ArrayConstructor.cpp

    r35242 r35291  
    4545{
    4646    // a single numeric argument denotes the array size (!)
    47     if (args.size() == 1 && args[0]->isNumber()) {
    48         uint32_t n = args[0]->toUInt32(exec);
    49         if (n != args[0]->toNumber(exec))
     47    if (args.size() == 1 && args.at(exec, 0)->isNumber()) {
     48        uint32_t n = args.at(exec, 0)->toUInt32(exec);
     49        if (n != args.at(exec, 0)->toNumber(exec))
    5050            return throwError(exec, RangeError, "Array size is not a small enough positive integer.");
    5151        return new (exec) JSArray(exec->lexicalGlobalObject()->arrayPrototype(), n);
     
    5353
    5454    // otherwise the array is constructed with the arguments in it
    55     return new (exec) JSArray(exec->lexicalGlobalObject()->arrayPrototype(), args);
     55    return new (exec) JSArray(exec, exec->lexicalGlobalObject()->arrayPrototype(), args);
    5656}
    5757
Note: See TracChangeset for help on using the changeset viewer.