| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 HASH_FUNCTION hash = FUNCTION_CAST<HASH_FUNCTION>(code->entry()); | 199 HASH_FUNCTION hash = FUNCTION_CAST<HASH_FUNCTION>(code->entry()); |
| 200 #ifdef USE_SIMULATOR | 200 #ifdef USE_SIMULATOR |
| 201 uint32_t codegen_hash = | 201 uint32_t codegen_hash = |
| 202 reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(hash, 0, 0, 0, 0, 0)); | 202 reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(hash, 0, 0, 0, 0, 0)); |
| 203 #else | 203 #else |
| 204 uint32_t codegen_hash = hash(); | 204 uint32_t codegen_hash = hash(); |
| 205 #endif | 205 #endif |
| 206 | 206 |
| 207 uint32_t runtime_hash = ComputeIntegerHash( | 207 uint32_t runtime_hash = ComputeIntegerHash( |
| 208 key, | 208 key, |
| 209 Isolate::Current()->heap()->StringHashSeed()); | 209 Isolate::Current()->heap()->HashSeed()); |
| 210 CHECK(runtime_hash == codegen_hash); | 210 CHECK(runtime_hash == codegen_hash); |
| 211 } | 211 } |
| 212 | 212 |
| 213 | 213 |
| 214 void check_twochars(char a, char b) { | 214 void check_twochars(char a, char b) { |
| 215 char ab[2] = {a, b}; | 215 char ab[2] = {a, b}; |
| 216 check(i::Vector<const char>(ab, 2)); | 216 check(i::Vector<const char>(ab, 2)); |
| 217 } | 217 } |
| 218 | 218 |
| 219 | 219 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // Some pseudo-random numbers | 251 // Some pseudo-random numbers |
| 252 static const uint32_t kLimit = 1000; | 252 static const uint32_t kLimit = 1000; |
| 253 for (uint32_t i = 0; i < 5; i++) { | 253 for (uint32_t i = 0; i < 5; i++) { |
| 254 for (uint32_t j = 0; j < 5; j++) { | 254 for (uint32_t j = 0; j < 5; j++) { |
| 255 check(PseudoRandom(i, j) % kLimit); | 255 check(PseudoRandom(i, j) % kLimit); |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 | 259 |
| 260 #undef __ | 260 #undef __ |
| OLD | NEW |