Added ARM and x64 support. I did a few changes and cleanup to simplify the rather complicated code.
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()) { On 2009/10/22 15:13:15, Kevin Millikin wrote: > 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) { > .... > } Done. http://codereview.chromium.org/316009/diff/1001/11#newcode268 Line 268: // Drop the result left on the stack. On 2009/10/22 15:13:15, Kevin Millikin wrote: > 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. Done. http://codereview.chromium.org/316009/diff/1001/11#newcode282 Line 282: ASSERT(property->key()->location().is_temporary()); On 2009/10/22 15:13:15, Kevin Millikin wrote: > Can't this ASSERT fail if the key is a number or a non-symbol string? (The > latter might not be currently possible.) Done. http://codereview.chromium.org/316009/diff/1001/11#newcode286 Line 286: // Ignore the result. On 2009/10/22 15:13:15, Kevin Millikin wrote: > 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. Done. http://codereview.chromium.org/316009 --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
