| OLD | NEW |
| 1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 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 11503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11514 " sum += ext_array[i] = i;" | 11514 " sum += ext_array[i] = i;" |
| 11515 " return sum;" | 11515 " return sum;" |
| 11516 "}" | 11516 "}" |
| 11517 "sum=0;" | 11517 "sum=0;" |
| 11518 "for (var i=0;i<10000;++i) {" | 11518 "for (var i=0;i<10000;++i) {" |
| 11519 " sum=ee_store_test_func(sum);" | 11519 " sum=ee_store_test_func(sum);" |
| 11520 "}" | 11520 "}" |
| 11521 "sum;"); | 11521 "sum;"); |
| 11522 CHECK_EQ(7800000, result->Int32Value()); | 11522 CHECK_EQ(7800000, result->Int32Value()); |
| 11523 | 11523 |
| 11524 // Test edge cases for crankshaft code. | |
| 11525 array->set(0, static_cast<ElementType>(0xFFFFFFFF)); | |
| 11526 result = CompileRun("function ee_limit_test_func(i) {" | |
| 11527 " return ext_array[i];" | |
| 11528 " return sum;" | |
| 11529 "}" | |
| 11530 "sum=0;" | |
| 11531 "for (var i=0;i<1000000;++i) {" | |
| 11532 " sum=ee_limit_test_func(0);" | |
| 11533 "}" | |
| 11534 "sum;"); | |
| 11535 if (array_type == v8::kExternalFloatArray) { | |
| 11536 CHECK_EQ(0, result->Int32Value()); | |
| 11537 } else { | |
| 11538 CHECK_EQ(static_cast<int>(static_cast<ElementType>(0xFFFFFFFF)), | |
| 11539 result->Int32Value()); | |
| 11540 } | |
| 11541 | |
| 11542 result = CompileRun("ext_array[3] = 33;" | 11524 result = CompileRun("ext_array[3] = 33;" |
| 11543 "delete ext_array[3];" | 11525 "delete ext_array[3];" |
| 11544 "ext_array[3];"); | 11526 "ext_array[3];"); |
| 11545 CHECK_EQ(33, result->Int32Value()); | 11527 CHECK_EQ(33, result->Int32Value()); |
| 11546 | 11528 |
| 11547 result = CompileRun("ext_array[0] = 10; ext_array[1] = 11;" | 11529 result = CompileRun("ext_array[0] = 10; ext_array[1] = 11;" |
| 11548 "ext_array[2] = 12; ext_array[3] = 13;" | 11530 "ext_array[2] = 12; ext_array[3] = 13;" |
| 11549 "ext_array.__defineGetter__('2'," | 11531 "ext_array.__defineGetter__('2'," |
| 11550 "function() { return 120; });" | 11532 "function() { return 120; });" |
| 11551 "ext_array[2];"); | 11533 "ext_array[2];"); |
| (...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13642 v8::Handle<v8::Function> define_property = | 13624 v8::Handle<v8::Function> define_property = |
| 13643 CompileRun("(function() {" | 13625 CompileRun("(function() {" |
| 13644 " Object.defineProperty(" | 13626 " Object.defineProperty(" |
| 13645 " this," | 13627 " this," |
| 13646 " 1," | 13628 " 1," |
| 13647 " { configurable: true, enumerable: true, value: 3 });" | 13629 " { configurable: true, enumerable: true, value: 3 });" |
| 13648 "})").As<Function>(); | 13630 "})").As<Function>(); |
| 13649 context->DetachGlobal(); | 13631 context->DetachGlobal(); |
| 13650 define_property->Call(proxy, 0, NULL); | 13632 define_property->Call(proxy, 0, NULL); |
| 13651 } | 13633 } |
| OLD | NEW |