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 19 matching lines...) Expand all Loading... |
30 // of ConsStrings. These operations may not be very fast, but they | 30 // of ConsStrings. These operations may not be very fast, but they |
31 // should be possible without getting errors due to too deep recursion. | 31 // should be possible without getting errors due to too deep recursion. |
32 | 32 |
33 #include <stdlib.h> | 33 #include <stdlib.h> |
34 | 34 |
35 #include "src/v8.h" | 35 #include "src/v8.h" |
36 | 36 |
37 #include "src/api.h" | 37 #include "src/api.h" |
38 #include "src/factory.h" | 38 #include "src/factory.h" |
39 #include "src/messages.h" | 39 #include "src/messages.h" |
| 40 #include "src/objects-inl.h" |
40 #include "src/objects.h" | 41 #include "src/objects.h" |
41 #include "src/unicode-decoder.h" | 42 #include "src/unicode-decoder.h" |
42 #include "test/cctest/cctest.h" | 43 #include "test/cctest/cctest.h" |
43 #include "test/cctest/heap/heap-utils.h" | 44 #include "test/cctest/heap/heap-utils.h" |
44 | 45 |
45 // Adapted from http://en.wikipedia.org/wiki/Multiply-with-carry | 46 // Adapted from http://en.wikipedia.org/wiki/Multiply-with-carry |
46 class MyRandomNumberGenerator { | 47 class MyRandomNumberGenerator { |
47 public: | 48 public: |
48 MyRandomNumberGenerator() { | 49 MyRandomNumberGenerator() { |
49 init(); | 50 init(); |
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 CHECK_EQ(1, CompileRun("external.indexOf('', 1)") | 1637 CHECK_EQ(1, CompileRun("external.indexOf('', 1)") |
1637 ->Int32Value(context.local()) | 1638 ->Int32Value(context.local()) |
1638 .FromJust()); | 1639 .FromJust()); |
1639 CHECK_EQ(-1, CompileRun("external.indexOf('a', 1)") | 1640 CHECK_EQ(-1, CompileRun("external.indexOf('a', 1)") |
1640 ->Int32Value(context.local()) | 1641 ->Int32Value(context.local()) |
1641 .FromJust()); | 1642 .FromJust()); |
1642 CHECK_EQ(-1, CompileRun("external.indexOf('$')") | 1643 CHECK_EQ(-1, CompileRun("external.indexOf('$')") |
1643 ->Int32Value(context.local()) | 1644 ->Int32Value(context.local()) |
1644 .FromJust()); | 1645 .FromJust()); |
1645 } | 1646 } |
OLD | NEW |