| Index: src/ia32/lithium-ia32.cc
|
| ===================================================================
|
| --- src/ia32/lithium-ia32.cc (revision 6170)
|
| +++ src/ia32/lithium-ia32.cc (working copy)
|
| @@ -767,11 +767,6 @@
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::DefineSameAsAny(LInstruction* instr) {
|
| - return Define(instr, new LUnallocated(LUnallocated::SAME_AS_ANY_INPUT));
|
| -}
|
| -
|
| -
|
| LInstruction* LChunkBuilder::DefineSameAsFirst(LInstruction* instr) {
|
| return Define(instr, new LUnallocated(LUnallocated::SAME_AS_FIRST_INPUT));
|
| }
|
| @@ -1016,9 +1011,6 @@
|
| HInstruction* current = block->first();
|
| int start = chunk_->instructions()->length();
|
| while (current != NULL && !is_aborted()) {
|
| - if (FLAG_trace_environment) {
|
| - PrintF("Process instruction %d\n", current->id());
|
| - }
|
| // Code for constants in registers is generated lazily.
|
| if (!current->EmitAtUses()) {
|
| VisitInstruction(current);
|
| @@ -1125,7 +1117,7 @@
|
| LEnvironment* outer = CreateEnvironment(hydrogen_env->outer());
|
| int ast_id = hydrogen_env->ast_id();
|
| ASSERT(ast_id != AstNode::kNoNumber);
|
| - int value_count = hydrogen_env->values()->length();
|
| + int value_count = hydrogen_env->length();
|
| LEnvironment* result = new LEnvironment(hydrogen_env->closure(),
|
| ast_id,
|
| hydrogen_env->parameter_count(),
|
| @@ -1677,19 +1669,15 @@
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::DoArrayLength(HArrayLength* instr) {
|
| - LOperand* array = NULL;
|
| - LOperand* temporary = NULL;
|
| +LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
|
| + LOperand* array = UseRegisterAtStart(instr->value());
|
| + return DefineAsRegister(new LJSArrayLength(array));
|
| +}
|
|
|
| - if (instr->value()->IsLoadElements()) {
|
| - array = UseRegisterAtStart(instr->value());
|
| - } else {
|
| - array = UseRegister(instr->value());
|
| - temporary = TempRegister();
|
| - }
|
|
|
| - LInstruction* result = new LArrayLength(array, temporary);
|
| - return AssignEnvironment(DefineAsRegister(result));
|
| +LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
|
| + LOperand* array = UseRegisterAtStart(instr->value());
|
| + return DefineAsRegister(new LFixedArrayLength(array));
|
| }
|
|
|
|
|
| @@ -1860,6 +1848,14 @@
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
|
| + HLoadFunctionPrototype* instr) {
|
| + return AssignEnvironment(DefineAsRegister(
|
| + new LLoadFunctionPrototype(UseRegister(instr->function()),
|
| + TempRegister())));
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) {
|
| LOperand* input = UseRegisterAtStart(instr->value());
|
| return DefineSameAsFirst(new LLoadElements(input));
|
| @@ -1931,7 +1927,7 @@
|
|
|
|
|
| LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| - bool needs_write_barrier = !instr->value()->type().IsSmi();
|
| + bool needs_write_barrier = instr->NeedsWriteBarrier();
|
|
|
| LOperand* obj = needs_write_barrier
|
| ? UseTempRegister(instr->object())
|
| @@ -2035,7 +2031,7 @@
|
|
|
|
|
| LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
|
| - LInstruction* result = new LTypeof(Use(instr->value()));
|
| + LInstruction* result = new LTypeof(UseAtStart(instr->value()));
|
| return MarkAsCall(DefineFixed(result, eax), instr);
|
| }
|
|
|
| @@ -2059,15 +2055,8 @@
|
| env->Push(value);
|
| }
|
| }
|
| + ASSERT(env->length() == instr->environment_length());
|
|
|
| - if (FLAG_trace_environment) {
|
| - PrintF("Reconstructed environment ast_id=%d, instr_id=%d\n",
|
| - instr->ast_id(),
|
| - instr->id());
|
| - env->PrintToStd();
|
| - }
|
| - ASSERT(env->values()->length() == instr->environment_height());
|
| -
|
| // If there is an instruction pending deoptimization environment create a
|
| // lazy bailout instruction to capture the environment.
|
| if (pending_deoptimization_ast_id_ == instr->ast_id()) {
|
|
|