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

Side by Side Diff: src/x64/full-codegen-x64.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/v8natives.js ('k') | test/mjsunit/object-define-property.js » ('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 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 __ Push(Smi::FromInt(NONE)); // PropertyAttributes 1452 __ Push(Smi::FromInt(NONE)); // PropertyAttributes
1453 __ CallRuntime(Runtime::kSetProperty, 4); 1453 __ CallRuntime(Runtime::kSetProperty, 4);
1454 } else { 1454 } else {
1455 __ Drop(3); 1455 __ Drop(3);
1456 } 1456 }
1457 break; 1457 break;
1458 case ObjectLiteral::Property::SETTER: 1458 case ObjectLiteral::Property::SETTER:
1459 case ObjectLiteral::Property::GETTER: 1459 case ObjectLiteral::Property::GETTER:
1460 __ push(Operand(rsp, 0)); // Duplicate receiver. 1460 __ push(Operand(rsp, 0)); // Duplicate receiver.
1461 VisitForStackValue(key); 1461 VisitForStackValue(key);
1462 __ Push(property->kind() == ObjectLiteral::Property::SETTER ? 1462 if (property->kind() == ObjectLiteral::Property::GETTER) {
1463 Smi::FromInt(1) : 1463 VisitForStackValue(value);
1464 Smi::FromInt(0)); 1464 __ PushRoot(Heap::kNullValueRootIndex);
1465 VisitForStackValue(value); 1465 } else {
1466 __ PushRoot(Heap::kNullValueRootIndex);
1467 VisitForStackValue(value);
1468 }
1466 __ Push(Smi::FromInt(NONE)); 1469 __ Push(Smi::FromInt(NONE));
1467 __ CallRuntime(Runtime::kDefineOrRedefineAccessorProperty, 5); 1470 __ CallRuntime(Runtime::kDefineOrRedefineAccessorProperty, 5);
1468 break; 1471 break;
1469 } 1472 }
1470 } 1473 }
1471 1474
1472 if (expr->has_function()) { 1475 if (expr->has_function()) {
1473 ASSERT(result_saved); 1476 ASSERT(result_saved);
1474 __ push(Operand(rsp, 0)); 1477 __ push(Operand(rsp, 0));
1475 __ CallRuntime(Runtime::kToFastProperties, 1); 1478 __ CallRuntime(Runtime::kToFastProperties, 1);
(...skipping 2887 matching lines...) Expand 10 before | Expand all | Expand 10 after
4363 *context_length = 0; 4366 *context_length = 0;
4364 return previous_; 4367 return previous_;
4365 } 4368 }
4366 4369
4367 4370
4368 #undef __ 4371 #undef __
4369 4372
4370 } } // namespace v8::internal 4373 } } // namespace v8::internal
4371 4374
4372 #endif // V8_TARGET_ARCH_X64 4375 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8natives.js ('k') | test/mjsunit/object-define-property.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698