OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 // We know that we have written a function, which is not a smi. | 740 // We know that we have written a function, which is not a smi. |
741 __ mov(a1, cp); | 741 __ mov(a1, cp); |
742 __ RecordWrite(a1, Operand(offset), a2, result_register()); | 742 __ RecordWrite(a1, Operand(offset), a2, result_register()); |
743 } | 743 } |
744 break; | 744 break; |
745 | 745 |
746 case Slot::LOOKUP: { | 746 case Slot::LOOKUP: { |
747 __ li(a2, Operand(variable->name())); | 747 __ li(a2, Operand(variable->name())); |
748 // Declaration nodes are always introduced in one of two modes. | 748 // Declaration nodes are always introduced in one of two modes. |
749 ASSERT(mode == Variable::VAR || | 749 ASSERT(mode == Variable::VAR || |
750 mode == Variable::CONST); | 750 mode == Variable::CONST || |
751 PropertyAttributes attr = | 751 mode == Variable::LET); |
752 (mode == Variable::VAR) ? NONE : READ_ONLY; | 752 PropertyAttributes attr = (mode == Variable::CONST) ? READ_ONLY : NONE; |
753 __ li(a1, Operand(Smi::FromInt(attr))); | 753 __ li(a1, Operand(Smi::FromInt(attr))); |
754 // Push initial value, if any. | 754 // Push initial value, if any. |
755 // Note: For variables we must not push an initial value (such as | 755 // Note: For variables we must not push an initial value (such as |
756 // 'undefined') because we may have a (legal) redeclaration and we | 756 // 'undefined') because we may have a (legal) redeclaration and we |
757 // must not destroy the current value. | 757 // must not destroy the current value. |
758 if (mode == Variable::CONST) { | 758 if (mode == Variable::CONST) { |
759 __ LoadRoot(a0, Heap::kTheHoleValueRootIndex); | 759 __ LoadRoot(a0, Heap::kTheHoleValueRootIndex); |
760 __ Push(cp, a2, a1, a0); | 760 __ Push(cp, a2, a1, a0); |
761 } else if (function != NULL) { | 761 } else if (function != NULL) { |
762 __ Push(cp, a2, a1); | 762 __ Push(cp, a2, a1); |
(...skipping 3555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4318 __ Addu(at, a1, Operand(masm_->CodeObject())); | 4318 __ Addu(at, a1, Operand(masm_->CodeObject())); |
4319 __ Jump(at); | 4319 __ Jump(at); |
4320 } | 4320 } |
4321 | 4321 |
4322 | 4322 |
4323 #undef __ | 4323 #undef __ |
4324 | 4324 |
4325 } } // namespace v8::internal | 4325 } } // namespace v8::internal |
4326 | 4326 |
4327 #endif // V8_TARGET_ARCH_MIPS | 4327 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |