OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/base/utils/random-number-generator.h" | 5 #include "src/base/utils/random-number-generator.h" |
6 #include "src/code-factory.h" | 6 #include "src/code-factory.h" |
7 #include "src/code-stub-assembler.h" | 7 #include "src/code-stub-assembler.h" |
8 #include "src/compiler/node.h" | 8 #include "src/compiler/node.h" |
9 #include "src/ic/stub-cache.h" | 9 #include "src/ic/stub-cache.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 261 |
262 enum Result { kFound, kNotFound }; | 262 enum Result { kFound, kNotFound }; |
263 { | 263 { |
264 Node* dictionary = m.Parameter(0); | 264 Node* dictionary = m.Parameter(0); |
265 Node* unique_name = m.Parameter(1); | 265 Node* unique_name = m.Parameter(1); |
266 Node* expected_result = m.Parameter(2); | 266 Node* expected_result = m.Parameter(2); |
267 Node* expected_arg = m.Parameter(3); | 267 Node* expected_arg = m.Parameter(3); |
268 | 268 |
269 Label passed(&m), failed(&m); | 269 Label passed(&m), failed(&m); |
270 Label if_found(&m), if_not_found(&m); | 270 Label if_found(&m), if_not_found(&m); |
271 Variable var_name_index(&m, MachineRepresentation::kWord32); | 271 Variable var_name_index(&m, MachineType::PointerRepresentation()); |
272 | 272 |
273 m.NameDictionaryLookup<Dictionary>(dictionary, unique_name, &if_found, | 273 m.NameDictionaryLookup<Dictionary>(dictionary, unique_name, &if_found, |
274 &var_name_index, &if_not_found); | 274 &var_name_index, &if_not_found); |
275 m.Bind(&if_found); | 275 m.Bind(&if_found); |
276 m.GotoUnless( | 276 m.GotoUnless( |
277 m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))), | 277 m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))), |
278 &failed); | 278 &failed); |
279 m.Branch(m.Word32Equal(m.SmiToWord32(expected_arg), var_name_index.value()), | 279 m.Branch(m.Word32Equal(m.SmiToWord32(expected_arg), var_name_index.value()), |
280 &passed, &failed); | 280 &passed, &failed); |
281 | 281 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 | 367 |
368 enum Result { kFound, kNotFound }; | 368 enum Result { kFound, kNotFound }; |
369 { | 369 { |
370 Node* dictionary = m.Parameter(0); | 370 Node* dictionary = m.Parameter(0); |
371 Node* key = m.SmiToWord32(m.Parameter(1)); | 371 Node* key = m.SmiToWord32(m.Parameter(1)); |
372 Node* expected_result = m.Parameter(2); | 372 Node* expected_result = m.Parameter(2); |
373 Node* expected_arg = m.Parameter(3); | 373 Node* expected_arg = m.Parameter(3); |
374 | 374 |
375 Label passed(&m), failed(&m); | 375 Label passed(&m), failed(&m); |
376 Label if_found(&m), if_not_found(&m); | 376 Label if_found(&m), if_not_found(&m); |
377 Variable var_entry(&m, MachineRepresentation::kWord32); | 377 Variable var_entry(&m, MachineType::PointerRepresentation()); |
378 | 378 |
379 m.NumberDictionaryLookup<Dictionary>(dictionary, key, &if_found, &var_entry, | 379 m.NumberDictionaryLookup<Dictionary>(dictionary, key, &if_found, &var_entry, |
380 &if_not_found); | 380 &if_not_found); |
381 m.Bind(&if_found); | 381 m.Bind(&if_found); |
382 m.GotoUnless( | 382 m.GotoUnless( |
383 m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))), | 383 m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))), |
384 &failed); | 384 &failed); |
385 m.Branch(m.Word32Equal(m.SmiToWord32(expected_arg), var_entry.value()), | 385 m.Branch(m.Word32Equal(m.SmiToWord32(expected_arg), var_entry.value()), |
386 &passed, &failed); | 386 &passed, &failed); |
387 | 387 |
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1504 | 1504 |
1505 Handle<Object> constructor = | 1505 Handle<Object> constructor = |
1506 Object::GetPropertyOrElement(result, | 1506 Object::GetPropertyOrElement(result, |
1507 isolate->factory()->constructor_string()) | 1507 isolate->factory()->constructor_string()) |
1508 .ToHandleChecked(); | 1508 .ToHandleChecked(); |
1509 CHECK(constructor->SameValue(*isolate->type_error_function())); | 1509 CHECK(constructor->SameValue(*isolate->type_error_function())); |
1510 } | 1510 } |
1511 | 1511 |
1512 } // namespace internal | 1512 } // namespace internal |
1513 } // namespace v8 | 1513 } // namespace v8 |
OLD | NEW |