| Index: src/mips/full-codegen-mips.cc
|
| ===================================================================
|
| --- src/mips/full-codegen-mips.cc (revision 9006)
|
| +++ src/mips/full-codegen-mips.cc (working copy)
|
| @@ -747,9 +747,9 @@
|
| __ li(a2, Operand(variable->name()));
|
| // Declaration nodes are always introduced in one of two modes.
|
| ASSERT(mode == Variable::VAR ||
|
| - mode == Variable::CONST);
|
| - PropertyAttributes attr =
|
| - (mode == Variable::VAR) ? NONE : READ_ONLY;
|
| + mode == Variable::CONST ||
|
| + mode == Variable::LET);
|
| + PropertyAttributes attr = (mode == Variable::CONST) ? READ_ONLY : NONE;
|
| __ li(a1, Operand(Smi::FromInt(attr)));
|
| // Push initial value, if any.
|
| // Note: For variables we must not push an initial value (such as
|
| @@ -886,7 +886,7 @@
|
| __ bind(&next_test);
|
| __ Drop(1); // Switch value is no longer needed.
|
| if (default_clause == NULL) {
|
| - __ Branch(nested_statement.break_target());
|
| + __ Branch(nested_statement.break_label());
|
| } else {
|
| __ Branch(default_clause->body_target());
|
| }
|
| @@ -900,7 +900,7 @@
|
| VisitStatements(clause->statements());
|
| }
|
|
|
| - __ bind(nested_statement.break_target());
|
| + __ bind(nested_statement.break_label());
|
| PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS);
|
| }
|
|
|
| @@ -1026,7 +1026,7 @@
|
| // Load the current count to a0, load the length to a1.
|
| __ lw(a0, MemOperand(sp, 0 * kPointerSize));
|
| __ lw(a1, MemOperand(sp, 1 * kPointerSize));
|
| - __ Branch(loop_statement.break_target(), hs, a0, Operand(a1));
|
| + __ Branch(loop_statement.break_label(), hs, a0, Operand(a1));
|
|
|
| // Get the current entry of the array into register a3.
|
| __ lw(a2, MemOperand(sp, 2 * kPointerSize));
|
| @@ -1053,7 +1053,7 @@
|
| __ push(a3); // Current entry.
|
| __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION);
|
| __ mov(a3, result_register());
|
| - __ Branch(loop_statement.continue_target(), eq, a3, Operand(zero_reg));
|
| + __ Branch(loop_statement.continue_label(), eq, a3, Operand(zero_reg));
|
|
|
| // Update the 'each' property or variable from the possibly filtered
|
| // entry in register a3.
|
| @@ -1069,7 +1069,7 @@
|
|
|
| // Generate code for the going to the next element by incrementing
|
| // the index (smi) stored on top of the stack.
|
| - __ bind(loop_statement.continue_target());
|
| + __ bind(loop_statement.continue_label());
|
| __ pop(a0);
|
| __ Addu(a0, a0, Operand(Smi::FromInt(1)));
|
| __ push(a0);
|
| @@ -1078,7 +1078,7 @@
|
| __ Branch(&loop);
|
|
|
| // Remove the pointers stored on the stack.
|
| - __ bind(loop_statement.break_target());
|
| + __ bind(loop_statement.break_label());
|
| __ Drop(5);
|
|
|
| // Exit and decrement the loop depth.
|
| @@ -4052,6 +4052,10 @@
|
| __ Branch(if_true, eq, v0, Operand(at));
|
| __ LoadRoot(at, Heap::kFalseValueRootIndex);
|
| Split(eq, v0, Operand(at), if_true, if_false, fall_through);
|
| + } else if (FLAG_harmony_typeof &&
|
| + check->Equals(isolate()->heap()->null_symbol())) {
|
| + __ LoadRoot(at, Heap::kNullValueRootIndex);
|
| + Split(eq, v0, Operand(at), if_true, if_false, fall_through);
|
| } else if (check->Equals(isolate()->heap()->undefined_symbol())) {
|
| __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
|
| __ Branch(if_true, eq, v0, Operand(at));
|
| @@ -4069,8 +4073,10 @@
|
|
|
| } else if (check->Equals(isolate()->heap()->object_symbol())) {
|
| __ JumpIfSmi(v0, if_false);
|
| - __ LoadRoot(at, Heap::kNullValueRootIndex);
|
| - __ Branch(if_true, eq, v0, Operand(at));
|
| + if (!FLAG_harmony_typeof) {
|
| + __ LoadRoot(at, Heap::kNullValueRootIndex);
|
| + __ Branch(if_true, eq, v0, Operand(at));
|
| + }
|
| // Check for JS objects => true.
|
| __ GetObjectType(v0, v0, a1);
|
| __ Branch(if_false, lt, a1, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
|
|
|