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 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 } else if (var->mode() == DYNAMIC_LOCAL) { | 1244 } else if (var->mode() == DYNAMIC_LOCAL) { |
1245 Variable* local = var->local_if_not_shadowed(); | 1245 Variable* local = var->local_if_not_shadowed(); |
1246 __ lw(v0, ContextSlotOperandCheckExtensions(local, slow)); | 1246 __ lw(v0, ContextSlotOperandCheckExtensions(local, slow)); |
1247 if (local->mode() == CONST || | 1247 if (local->mode() == CONST || |
1248 local->mode() == CONST_HARMONY || | 1248 local->mode() == CONST_HARMONY || |
1249 local->mode() == LET) { | 1249 local->mode() == LET) { |
1250 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 1250 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
1251 __ subu(at, v0, at); // Sub as compare: at == 0 on eq. | 1251 __ subu(at, v0, at); // Sub as compare: at == 0 on eq. |
1252 if (local->mode() == CONST) { | 1252 if (local->mode() == CONST) { |
1253 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); | 1253 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); |
1254 __ movz(v0, a0, at); // Conditional move: return Undefined if TheHole. | 1254 __ Movz(v0, a0, at); // Conditional move: return Undefined if TheHole. |
1255 } else { // LET || CONST_HARMONY | 1255 } else { // LET || CONST_HARMONY |
1256 __ Branch(done, ne, at, Operand(zero_reg)); | 1256 __ Branch(done, ne, at, Operand(zero_reg)); |
1257 __ li(a0, Operand(var->name())); | 1257 __ li(a0, Operand(var->name())); |
1258 __ push(a0); | 1258 __ push(a0); |
1259 __ CallRuntime(Runtime::kThrowReferenceError, 1); | 1259 __ CallRuntime(Runtime::kThrowReferenceError, 1); |
1260 } | 1260 } |
1261 } | 1261 } |
1262 __ Branch(done); | 1262 __ Branch(done); |
1263 } | 1263 } |
1264 } | 1264 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 Label done; | 1336 Label done; |
1337 __ Branch(&done, ne, at, Operand(zero_reg)); | 1337 __ Branch(&done, ne, at, Operand(zero_reg)); |
1338 __ li(a0, Operand(var->name())); | 1338 __ li(a0, Operand(var->name())); |
1339 __ push(a0); | 1339 __ push(a0); |
1340 __ CallRuntime(Runtime::kThrowReferenceError, 1); | 1340 __ CallRuntime(Runtime::kThrowReferenceError, 1); |
1341 __ bind(&done); | 1341 __ bind(&done); |
1342 } else { | 1342 } else { |
1343 // Uninitalized const bindings outside of harmony mode are unholed. | 1343 // Uninitalized const bindings outside of harmony mode are unholed. |
1344 ASSERT(var->mode() == CONST); | 1344 ASSERT(var->mode() == CONST); |
1345 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); | 1345 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); |
1346 __ movz(v0, a0, at); // Conditional move: Undefined if TheHole. | 1346 __ Movz(v0, a0, at); // Conditional move: Undefined if TheHole. |
1347 } | 1347 } |
1348 context()->Plug(v0); | 1348 context()->Plug(v0); |
1349 break; | 1349 break; |
1350 } | 1350 } |
1351 } | 1351 } |
1352 context()->Plug(var); | 1352 context()->Plug(var); |
1353 break; | 1353 break; |
1354 } | 1354 } |
1355 | 1355 |
1356 case Variable::LOOKUP: { | 1356 case Variable::LOOKUP: { |
(...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4490 *context_length = 0; | 4490 *context_length = 0; |
4491 return previous_; | 4491 return previous_; |
4492 } | 4492 } |
4493 | 4493 |
4494 | 4494 |
4495 #undef __ | 4495 #undef __ |
4496 | 4496 |
4497 } } // namespace v8::internal | 4497 } } // namespace v8::internal |
4498 | 4498 |
4499 #endif // V8_TARGET_ARCH_MIPS | 4499 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |