Revision: 8442
Author: [email protected]
Date: Tue Jun 28 01:54:09 2011
Log: Cleanup to HEnvironment::CopyForInlining
* src/hydrogen.cc (HEnvironment::CopyForInlining): As the code for both
the ::HYDROGEN and ::LITHIUM compilation phases is the same, just use
one code path and remove the arg.
* src/hydrogen.h (HEnvironment): Remove now-unused CompilationPhase
enum type and arg to CopyForInlining.
* src/arm/lithium-arm.cc (LChunkBuilder::DoEnterInlined):
* src/ia32/lithium-ia32.cc (LChunkBuilder::DoEnterInlined):
* src/x64/lithium-x64.cc (LChunkBuilder::DoEnterInlined): Adapt
callers.
* AUTHORS: Add Igalia.
BUG=
TEST=I ran tools/test.py.
Review URL: http://codereview.chromium.org/7272002
http://code.google.com/p/v8/source/detail?r=8442
Modified:
/branches/bleeding_edge/AUTHORS
/branches/bleeding_edge/src/arm/lithium-arm.cc
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/src/hydrogen.h
/branches/bleeding_edge/src/ia32/lithium-ia32.cc
/branches/bleeding_edge/src/x64/lithium-x64.cc
=======================================
--- /branches/bleeding_edge/AUTHORS Sun May 8 07:55:57 2011
+++ /branches/bleeding_edge/AUTHORS Tue Jun 28 01:54:09 2011
@@ -7,6 +7,7 @@
Sigma Designs Inc.
ARM Ltd.
Hewlett-Packard Development Company, LP
+Igalia, S.L.
Akinori MUSHA <[email protected]>
Alexander Botero-Lowry <[email protected]>
=======================================
--- /branches/bleeding_edge/src/arm/lithium-arm.cc Mon Jun 27 05:12:27 2011
+++ /branches/bleeding_edge/src/arm/lithium-arm.cc Tue Jun 28 01:54:09 2011
@@ -2217,7 +2217,6 @@
HConstant* undefined = graph()->GetConstantUndefined();
HEnvironment* inner = outer->CopyForInlining(instr->closure(),
instr->function(),
- HEnvironment::LITHIUM,
undefined,
instr->call_kind());
current_block_->UpdateEnvironment(inner);
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Mon Jun 27 05:12:27 2011
+++ /branches/bleeding_edge/src/hydrogen.cc Tue Jun 28 01:54:09 2011
@@ -4449,7 +4449,6 @@
HEnvironment* inner_env =
environment()->CopyForInlining(target,
function,
- HEnvironment::HYDROGEN,
undefined,
call_kind);
HBasicBlock* body_entry = CreateBasicBlock(inner_env);
@@ -6212,7 +6211,6 @@
HEnvironment* HEnvironment::CopyForInlining(
Handle<JSFunction> target,
FunctionLiteral* function,
- CompilationPhase compilation_phase,
HConstant* undefined,
CallKind call_kind) const {
// Outer environment is a copy of this one without the arguments.
@@ -6224,17 +6222,9 @@
HEnvironment* inner =
new(zone) HEnvironment(outer, function->scope(), target);
// Get the argument values from the original environment.
- if (compilation_phase == HYDROGEN) {
- for (int i = 0; i <= arity; ++i) { // Include receiver.
- HValue* push = ExpressionStackAt(arity - i);
- inner->SetValueAt(i, push);
- }
- } else {
- ASSERT(compilation_phase == LITHIUM);
- for (int i = 0; i <= arity; ++i) { // Include receiver.
- HValue* push = ExpressionStackAt(arity - i);
- inner->SetValueAt(i, push);
- }
+ for (int i = 0; i <= arity; ++i) { // Include receiver.
+ HValue* push = ExpressionStackAt(arity - i);
+ inner->SetValueAt(i, push);
}
// If the function we are inlining is a strict mode function or a
// builtin function, pass undefined as the receiver for function
=======================================
--- /branches/bleeding_edge/src/hydrogen.h Mon Jun 27 05:12:27 2011
+++ /branches/bleeding_edge/src/hydrogen.h Tue Jun 28 01:54:09 2011
@@ -329,8 +329,6 @@
class HEnvironment: public ZoneObject {
public:
- enum CompilationPhase { HYDROGEN, LITHIUM };
-
HEnvironment(HEnvironment* outer,
Scope* scope,
Handle<JSFunction> closure);
@@ -417,12 +415,9 @@
// Create an "inlined version" of this environment, where the original
// environment is the outer environment but the top expression stack
- // elements are moved to an inner environment as parameters. If
- // is_speculative, the argument values are expected to be PushArgument
- // instructions, otherwise they are the actual values.
+ // elements are moved to an inner environment as parameters.
HEnvironment* CopyForInlining(Handle<JSFunction> target,
FunctionLiteral* function,
- CompilationPhase compilation_phase,
HConstant* undefined,
CallKind call_kind) const;
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.cc Mon Jun 27 05:12:27
2011
+++ /branches/bleeding_edge/src/ia32/lithium-ia32.cc Tue Jun 28 01:54:09
2011
@@ -2267,7 +2267,6 @@
HConstant* undefined = graph()->GetConstantUndefined();
HEnvironment* inner = outer->CopyForInlining(instr->closure(),
instr->function(),
- HEnvironment::LITHIUM,
undefined,
instr->call_kind());
current_block_->UpdateEnvironment(inner);
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.cc Mon Jun 27 05:12:27 2011
+++ /branches/bleeding_edge/src/x64/lithium-x64.cc Tue Jun 28 01:54:09 2011
@@ -2208,7 +2208,6 @@
HConstant* undefined = graph()->GetConstantUndefined();
HEnvironment* inner = outer->CopyForInlining(instr->closure(),
instr->function(),
- HEnvironment::LITHIUM,
undefined,
instr->call_kind());
current_block_->UpdateEnvironment(inner);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev