Initial ideas.
http://codereview.chromium.org/316009/diff/1001/11 File src/ia32/fast-codegen-ia32.cc (right): http://codereview.chromium.org/316009/diff/1001/11#newcode247 Line 247: switch (property->kind()) { You could avoid duplicating the rather annoying result_saved check. ObjectLiteral::Property::Kind kind = property->kind(); if (kind == ObjectLiteral::Property::CONSTANT) continue; if (kind == ObjectLiteral::Property::MATERIALIZED_LITERAL && CompileTimeValue::IsCompileTimeValue(property->value())) { continue; } // Here you know you will emit code... if (!result_saved) { __ push(eax); result_saved = true; } switch (kind) { .... } http://codereview.chromium.org/316009/diff/1001/11#newcode268 Line 268: // Drop the result left on the stack. Here you're dropping the receiver. As long as store ICs never patch the receiver, there is no reason to have duplicated it in the first place. http://codereview.chromium.org/316009/diff/1001/11#newcode282 Line 282: ASSERT(property->key()->location().is_temporary()); Can't this ASSERT fail if the key is a number or a non-symbol string? (The latter might not be currently possible.) http://codereview.chromium.org/316009/diff/1001/11#newcode286 Line 286: // Ignore the result. The result of the runtime call is the object. It might be better to avoid duplicating it on the stack and get the result back in eax. You would have to push it before visiting the subexpressions (but you do that anyway) and you could get rid of the whole result_saved thing. http://codereview.chromium.org/316009 --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
