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 13554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13565 "sum;"); | 13565 "sum;"); |
13566 CHECK_EQ(28, result->Int32Value()); | 13566 CHECK_EQ(28, result->Int32Value()); |
13567 | 13567 |
13568 result = CompileRun("var sum = 0;" | 13568 result = CompileRun("var sum = 0;" |
13569 "for (var i = 0; i < 8; i++) {" | 13569 "for (var i = 0; i < 8; i++) {" |
13570 " sum += pixels[i];" | 13570 " sum += pixels[i];" |
13571 "}" | 13571 "}" |
13572 "sum;"); | 13572 "sum;"); |
13573 CHECK_EQ(28, result->Int32Value()); | 13573 CHECK_EQ(28, result->Int32Value()); |
13574 | 13574 |
13575 i::Handle<i::Smi> value(i::Smi::FromInt(2)); | 13575 i::Handle<i::Smi> value(i::Smi::FromInt(2), |
| 13576 reinterpret_cast<i::Isolate*>(context->GetIsolate())); |
13576 i::Handle<i::Object> no_failure; | 13577 i::Handle<i::Object> no_failure; |
13577 no_failure = | 13578 no_failure = |
13578 i::JSObject::SetElement(jsobj, 1, value, NONE, i::kNonStrictMode); | 13579 i::JSObject::SetElement(jsobj, 1, value, NONE, i::kNonStrictMode); |
13579 ASSERT(!no_failure.is_null()); | 13580 ASSERT(!no_failure.is_null()); |
13580 i::USE(no_failure); | 13581 i::USE(no_failure); |
13581 CHECK_EQ(2, i::Smi::cast(jsobj->GetElement(1)->ToObjectChecked())->value()); | 13582 CHECK_EQ(2, i::Smi::cast(jsobj->GetElement(1)->ToObjectChecked())->value()); |
13582 *value.location() = i::Smi::FromInt(256); | 13583 *value.location() = i::Smi::FromInt(256); |
13583 no_failure = | 13584 no_failure = |
13584 i::JSObject::SetElement(jsobj, 1, value, NONE, i::kNonStrictMode); | 13585 i::JSObject::SetElement(jsobj, 1, value, NONE, i::kNonStrictMode); |
13585 ASSERT(!no_failure.is_null()); | 13586 ASSERT(!no_failure.is_null()); |
(...skipping 4682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18268 i::Semaphore* sem_; | 18269 i::Semaphore* sem_; |
18269 volatile int sem_value_; | 18270 volatile int sem_value_; |
18270 }; | 18271 }; |
18271 | 18272 |
18272 | 18273 |
18273 THREADED_TEST(SemaphoreInterruption) { | 18274 THREADED_TEST(SemaphoreInterruption) { |
18274 ThreadInterruptTest().RunTest(); | 18275 ThreadInterruptTest().RunTest(); |
18275 } | 18276 } |
18276 | 18277 |
18277 #endif // WIN32 | 18278 #endif // WIN32 |
OLD | NEW |