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

Unified Diff: test/mjsunit/generated-keyed-store-stubs.js

Issue 12221064: Implement many KeyedStoreStubs using Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add runtime flag and address review feedback Created 7 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 side-by-side diff with in-line comments
Download patch
« src/ic.cc ('K') | « test/mjsunit/elements-kind.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/generated-keyed-store-stubs.js
diff --git a/src/marking-thread.cc b/test/mjsunit/generated-keyed-store-stubs.js
similarity index 57%
copy from src/marking-thread.cc
copy to test/mjsunit/generated-keyed-store-stubs.js
index ac6438126891ff0d26e7e021d12bdb43cf9bd817..a553c8fecbd2a8f01159bd8e2f8b078733cefb7d 100644
--- a/src/marking-thread.cc
+++ b/test/mjsunit/generated-keyed-store-stubs.js
@@ -25,61 +25,85 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "marking-thread.h"
+// Flags: --allow-natives-syntax --compiled_keyed_stores
-#include "v8.h"
-
-#include "isolate.h"
-#include "v8threads.h"
-
-namespace v8 {
-namespace internal {
-
-MarkingThread::MarkingThread(Isolate* isolate)
- : Thread("MarkingThread"),
- isolate_(isolate),
- heap_(isolate->heap()),
- start_marking_semaphore_(OS::CreateSemaphore(0)),
- end_marking_semaphore_(OS::CreateSemaphore(0)),
- stop_semaphore_(OS::CreateSemaphore(0)) {
- NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(false));
- id_ = NoBarrier_AtomicIncrement(&id_counter_, 1);
+function store0(a,i,v) {
+ a[i] = v;
}
+a = new Array(8);
+store0(a,0,-10);
+store0(a,0,-10);
+store0(a,0,-10);
+assertEquals(-10, a[0]);
-Atomic32 MarkingThread::id_counter_ = -1;
-
+function store1(a,i,v) {
+ a[i] = v;
+}
-void MarkingThread::Run() {
- Isolate::SetIsolateThreadLocals(isolate_, NULL);
+a = new Int8Array(8);
+store1(a,0,-10);
+store1(a,0,-10);
+store1(a,0,-10);
+assertEquals(-10, a[0]);
- while (true) {
- start_marking_semaphore_->Wait();
+function store2(a,i,v) {
+ a[i] = v;
+}
- if (Acquire_Load(&stop_thread_)) {
- stop_semaphore_->Signal();
- return;
- }
+a = new Uint8Array(8);
+store2(a,0,10);
+store2(a,0,10);
+store2(a,0,10);
+assertEquals(10, a[0]);
+store2(a,0,257);
+assertEquals(1, a[0]);
- end_marking_semaphore_->Signal();
- }
+function store3(a,i,v) {
+ a[i] = v;
}
+a = new Int16Array(8);
+store3(a,0,-10);
+store3(a,0,-10);
+store3(a,0,-10);
+assertEquals(-10, a[0]);
+store3(a,0,65537);
+assertEquals(1, a[0]);
-void MarkingThread::Stop() {
- Release_Store(&stop_thread_, static_cast<AtomicWord>(true));
- start_marking_semaphore_->Signal();
- stop_semaphore_->Wait();
+function store4(a,i,v) {
+ a[i] = v;
}
+a = new Uint16Array(8);
+store4(a,0,10);
+store4(a,0,10);
+store4(a,0,257);
+assertEquals(257, a[0]);
+store4(a,0,-10);
+assertEquals(65526, a[0]);
-void MarkingThread::StartMarking() {
- start_marking_semaphore_->Signal();
+function store5(a,i,v) {
+ a[i] = v;
}
+a = new Int32Array(8);
+store5(a,0,-10);
+store5(a,0,-10);
+store5(a,0,-10);
+assertEquals(-10, a[0]);
+store5(a,0,65537);
+assertEquals(65537,a[0]);
-void MarkingThread::WaitForMarkingThread() {
- end_marking_semaphore_->Wait();
+function store6(a,i,v) {
+ a[i] = v;
}
-} } // namespace v8::internal
+a = new Uint32Array(8);
+store6(a,0,10);
+store6(a,0,10);
+store6(a,0,257);
+assertEquals(257, a[0]);
+store6(a,0,-10);
+assertEquals(4294967286, a[0]);
+
« src/ic.cc ('K') | « test/mjsunit/elements-kind.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698