| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 } else if (var->mode() == DYNAMIC_LOCAL) { | 1261 } else if (var->mode() == DYNAMIC_LOCAL) { |
| 1262 Variable* local = var->local_if_not_shadowed(); | 1262 Variable* local = var->local_if_not_shadowed(); |
| 1263 __ lw(v0, ContextSlotOperandCheckExtensions(local, slow)); | 1263 __ lw(v0, ContextSlotOperandCheckExtensions(local, slow)); |
| 1264 if (local->mode() == CONST || | 1264 if (local->mode() == CONST || |
| 1265 local->mode() == CONST_HARMONY || | 1265 local->mode() == CONST_HARMONY || |
| 1266 local->mode() == LET) { | 1266 local->mode() == LET) { |
| 1267 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 1267 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
| 1268 __ subu(at, v0, at); // Sub as compare: at == 0 on eq. | 1268 __ subu(at, v0, at); // Sub as compare: at == 0 on eq. |
| 1269 if (local->mode() == CONST) { | 1269 if (local->mode() == CONST) { |
| 1270 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); | 1270 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); |
| 1271 __ movz(v0, a0, at); // Conditional move: return Undefined if TheHole. | 1271 __ Movz(v0, a0, at); // Conditional move: return Undefined if TheHole. |
| 1272 } else { // LET || CONST_HARMONY | 1272 } else { // LET || CONST_HARMONY |
| 1273 __ Branch(done, ne, at, Operand(zero_reg)); | 1273 __ Branch(done, ne, at, Operand(zero_reg)); |
| 1274 __ li(a0, Operand(var->name())); | 1274 __ li(a0, Operand(var->name())); |
| 1275 __ push(a0); | 1275 __ push(a0); |
| 1276 __ CallRuntime(Runtime::kThrowReferenceError, 1); | 1276 __ CallRuntime(Runtime::kThrowReferenceError, 1); |
| 1277 } | 1277 } |
| 1278 } | 1278 } |
| 1279 __ Branch(done); | 1279 __ Branch(done); |
| 1280 } | 1280 } |
| 1281 } | 1281 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 Label done; | 1353 Label done; |
| 1354 __ Branch(&done, ne, at, Operand(zero_reg)); | 1354 __ Branch(&done, ne, at, Operand(zero_reg)); |
| 1355 __ li(a0, Operand(var->name())); | 1355 __ li(a0, Operand(var->name())); |
| 1356 __ push(a0); | 1356 __ push(a0); |
| 1357 __ CallRuntime(Runtime::kThrowReferenceError, 1); | 1357 __ CallRuntime(Runtime::kThrowReferenceError, 1); |
| 1358 __ bind(&done); | 1358 __ bind(&done); |
| 1359 } else { | 1359 } else { |
| 1360 // Uninitalized const bindings outside of harmony mode are unholed. | 1360 // Uninitalized const bindings outside of harmony mode are unholed. |
| 1361 ASSERT(var->mode() == CONST); | 1361 ASSERT(var->mode() == CONST); |
| 1362 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); | 1362 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); |
| 1363 __ movz(v0, a0, at); // Conditional move: Undefined if TheHole. | 1363 __ Movz(v0, a0, at); // Conditional move: Undefined if TheHole. |
| 1364 } | 1364 } |
| 1365 context()->Plug(v0); | 1365 context()->Plug(v0); |
| 1366 break; | 1366 break; |
| 1367 } | 1367 } |
| 1368 } | 1368 } |
| 1369 context()->Plug(var); | 1369 context()->Plug(var); |
| 1370 break; | 1370 break; |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 case Variable::LOOKUP: { | 1373 case Variable::LOOKUP: { |
| (...skipping 3083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4457 *context_length = 0; | 4457 *context_length = 0; |
| 4458 return previous_; | 4458 return previous_; |
| 4459 } | 4459 } |
| 4460 | 4460 |
| 4461 | 4461 |
| 4462 #undef __ | 4462 #undef __ |
| 4463 | 4463 |
| 4464 } } // namespace v8::internal | 4464 } } // namespace v8::internal |
| 4465 | 4465 |
| 4466 #endif // V8_TARGET_ARCH_MIPS | 4466 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |