Treehydra: Allow setting properties on lazy objects

RESOLVED FIXED

Status

Firefox Build System
Source Code Analysis
RESOLVED FIXED
11 years ago
5 months ago

People

(Reporter: dmandelin, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
Test case:

  function process_tree(t) {
    t.foo = "bar";
    print(t.foo);
  }

I want it to print "bar". Currently it produces an unhandledLazyProperty error. The reason for this request is so I can annotate basic blocks and CFGs with states during analysis, bookkeeping information, and analysis results to pass to other analysis passes. All of this is intraprocedural, so it should not be affected by GCC object lifetimes.

Per shaver, the error is actually caused by the property set line of code, because resolve is called on new property creation. The JSNewResolveOp API [1] should give Treehydra the ability to figure this out, via the JSRESOLVE_ASSIGNING flag.

[1] http://developer.mozilla.org/en/docs/JSNewResolveOp

Comment 1

11 years ago
This testcase works here. 
(Reporter)

Comment 2

11 years ago
(In reply to comment #1)
> This testcase works here. 

Sorry, there's a subtlety in the resolve function, so when I hand-reduced my test, I took out something necessary. The following test case should show the error:

  function process_tree(t) {
    let x = t.function_decl;
    t.foo = "bar";
    print(t.foo);
  }


Comment 3

11 years ago
Fixed, thanks.
Status: NEW → ASSIGNED
(Reporter)

Updated

10 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Updated

5 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.