| 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 21160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21171 v8::Local<v8::String> result = v8::String::Concat(str, str); | 21171 v8::Local<v8::String> result = v8::String::Concat(str, str); |
| 21172 CHECK(result.IsEmpty()); | 21172 CHECK(result.IsEmpty()); |
| 21173 CHECK(!try_catch.HasCaught()); | 21173 CHECK(!try_catch.HasCaught()); |
| 21174 } | 21174 } |
| 21175 | 21175 |
| 21176 | 21176 |
| 21177 TEST(TurboAsmDisablesNeuter) { | 21177 TEST(TurboAsmDisablesNeuter) { |
| 21178 v8::V8::Initialize(); | 21178 v8::V8::Initialize(); |
| 21179 v8::HandleScope scope(CcTest::isolate()); | 21179 v8::HandleScope scope(CcTest::isolate()); |
| 21180 LocalContext context; | 21180 LocalContext context; |
| 21181 #if V8_TURBOFAN_TARGET | |
| 21182 bool should_be_neuterable = !i::FLAG_turbo_asm; | 21181 bool should_be_neuterable = !i::FLAG_turbo_asm; |
| 21183 #else | |
| 21184 bool should_be_neuterable = true; | |
| 21185 #endif | |
| 21186 const char* load = | 21182 const char* load = |
| 21187 "function Module(stdlib, foreign, heap) {" | 21183 "function Module(stdlib, foreign, heap) {" |
| 21188 " 'use asm';" | 21184 " 'use asm';" |
| 21189 " var MEM32 = new stdlib.Int32Array(heap);" | 21185 " var MEM32 = new stdlib.Int32Array(heap);" |
| 21190 " function load() { return MEM32[0]; }" | 21186 " function load() { return MEM32[0]; }" |
| 21191 " return { load: load };" | 21187 " return { load: load };" |
| 21192 "}" | 21188 "}" |
| 21193 "var buffer = new ArrayBuffer(4);" | 21189 "var buffer = new ArrayBuffer(4);" |
| 21194 "Module(this, {}, buffer).load();" | 21190 "Module(this, {}, buffer).load();" |
| 21195 "buffer"; | 21191 "buffer"; |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21822 CHECK(try_catch.HasTerminated()); | 21818 CHECK(try_catch.HasTerminated()); |
| 21823 } | 21819 } |
| 21824 | 21820 |
| 21825 | 21821 |
| 21826 TEST(EstimatedContextSize) { | 21822 TEST(EstimatedContextSize) { |
| 21827 v8::Isolate* isolate = CcTest::isolate(); | 21823 v8::Isolate* isolate = CcTest::isolate(); |
| 21828 v8::HandleScope scope(isolate); | 21824 v8::HandleScope scope(isolate); |
| 21829 LocalContext env; | 21825 LocalContext env; |
| 21830 CHECK(50000 < env->EstimatedSize()); | 21826 CHECK(50000 < env->EstimatedSize()); |
| 21831 } | 21827 } |
| OLD | NEW |