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 1501 matching lines...) Loading... |
1512 __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes | 1512 __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes |
1513 __ CallRuntime(Runtime::kSetProperty, 4); | 1513 __ CallRuntime(Runtime::kSetProperty, 4); |
1514 } else { | 1514 } else { |
1515 __ Drop(3); | 1515 __ Drop(3); |
1516 } | 1516 } |
1517 break; | 1517 break; |
1518 case ObjectLiteral::Property::SETTER: | 1518 case ObjectLiteral::Property::SETTER: |
1519 case ObjectLiteral::Property::GETTER: | 1519 case ObjectLiteral::Property::GETTER: |
1520 __ push(Operand(esp, 0)); // Duplicate receiver. | 1520 __ push(Operand(esp, 0)); // Duplicate receiver. |
1521 VisitForStackValue(key); | 1521 VisitForStackValue(key); |
1522 __ push(Immediate(property->kind() == ObjectLiteral::Property::SETTER ? | 1522 if (property->kind() == ObjectLiteral::Property::GETTER) { |
1523 Smi::FromInt(1) : | 1523 VisitForStackValue(value); |
1524 Smi::FromInt(0))); | 1524 __ push(Immediate(isolate()->factory()->null_value())); |
1525 VisitForStackValue(value); | 1525 } else { |
| 1526 __ push(Immediate(isolate()->factory()->null_value())); |
| 1527 VisitForStackValue(value); |
| 1528 } |
1526 __ push(Immediate(Smi::FromInt(NONE))); | 1529 __ push(Immediate(Smi::FromInt(NONE))); |
1527 __ CallRuntime(Runtime::kDefineOrRedefineAccessorProperty, 5); | 1530 __ CallRuntime(Runtime::kDefineOrRedefineAccessorProperty, 5); |
1528 break; | 1531 break; |
1529 default: UNREACHABLE(); | 1532 default: UNREACHABLE(); |
1530 } | 1533 } |
1531 } | 1534 } |
1532 | 1535 |
1533 if (expr->has_function()) { | 1536 if (expr->has_function()) { |
1534 ASSERT(result_saved); | 1537 ASSERT(result_saved); |
1535 __ push(Operand(esp, 0)); | 1538 __ push(Operand(esp, 0)); |
(...skipping 2927 matching lines...) Loading... |
4463 *context_length = 0; | 4466 *context_length = 0; |
4464 return previous_; | 4467 return previous_; |
4465 } | 4468 } |
4466 | 4469 |
4467 | 4470 |
4468 #undef __ | 4471 #undef __ |
4469 | 4472 |
4470 } } // namespace v8::internal | 4473 } } // namespace v8::internal |
4471 | 4474 |
4472 #endif // V8_TARGET_ARCH_IA32 | 4475 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |