Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 9616016: Make the runtime entry for setting/changing accessors "atomic". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorporated review comments. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/messages.js ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 } else { 1493 } else {
1494 __ Drop(3); 1494 __ Drop(3);
1495 } 1495 }
1496 break; 1496 break;
1497 case ObjectLiteral::Property::GETTER: 1497 case ObjectLiteral::Property::GETTER:
1498 case ObjectLiteral::Property::SETTER: 1498 case ObjectLiteral::Property::SETTER:
1499 // Duplicate receiver on stack. 1499 // Duplicate receiver on stack.
1500 __ lw(a0, MemOperand(sp)); 1500 __ lw(a0, MemOperand(sp));
1501 __ push(a0); 1501 __ push(a0);
1502 VisitForStackValue(key); 1502 VisitForStackValue(key);
1503 __ li(a1, Operand(property->kind() == ObjectLiteral::Property::SETTER ? 1503 if (property->kind() == ObjectLiteral::Property::GETTER) {
1504 Smi::FromInt(1) : 1504 VisitForStackValue(value);
1505 Smi::FromInt(0))); 1505 __ LoadRoot(a1, Heap::kNullValueRootIndex);
1506 __ push(a1); 1506 __ push(a1);
1507 VisitForStackValue(value); 1507 } else {
1508 __ LoadRoot(a1, Heap::kNullValueRootIndex);
1509 __ push(a1);
1510 VisitForStackValue(value);
1511 }
1508 __ li(a0, Operand(Smi::FromInt(NONE))); 1512 __ li(a0, Operand(Smi::FromInt(NONE)));
1509 __ push(a0); 1513 __ push(a0);
1510 __ CallRuntime(Runtime::kDefineOrRedefineAccessorProperty, 5); 1514 __ CallRuntime(Runtime::kDefineOrRedefineAccessorProperty, 5);
1511 break; 1515 break;
1512 } 1516 }
1513 } 1517 }
1514 1518
1515 if (expr->has_function()) { 1519 if (expr->has_function()) {
1516 ASSERT(result_saved); 1520 ASSERT(result_saved);
1517 __ lw(a0, MemOperand(sp)); 1521 __ lw(a0, MemOperand(sp));
(...skipping 2912 matching lines...) Expand 10 before | Expand all | Expand 10 after
4430 *context_length = 0; 4434 *context_length = 0;
4431 return previous_; 4435 return previous_;
4432 } 4436 }
4433 4437
4434 4438
4435 #undef __ 4439 #undef __
4436 4440
4437 } } // namespace v8::internal 4441 } } // namespace v8::internal
4438 4442
4439 #endif // V8_TARGET_ARCH_MIPS 4443 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698