Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: test/cctest/test-feedback-vector.cc

Issue 988653003: Use platform specific stubs for vector-based Load/KeyedLoad. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Included the MIPs port from Paul and Akos. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/v8.h" 5 #include "src/v8.h"
6 #include "test/cctest/cctest.h" 6 #include "test/cctest/cctest.h"
7 7
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/debug.h" 9 #include "src/debug.h"
10 #include "src/execution.h" 10 #include "src/execution.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 int index = vector->GetIndex(FeedbackVectorSlot(0)); 65 int index = vector->GetIndex(FeedbackVectorSlot(0));
66 66
67 CHECK_EQ(TypeFeedbackVector::kReservedIndexCount + metadata_length, index); 67 CHECK_EQ(TypeFeedbackVector::kReservedIndexCount + metadata_length, index);
68 CHECK(FeedbackVectorSlot(0) == vector->ToSlot(index)); 68 CHECK(FeedbackVectorSlot(0) == vector->ToSlot(index));
69 69
70 index = vector->GetIndex(FeedbackVectorICSlot(0)); 70 index = vector->GetIndex(FeedbackVectorICSlot(0));
71 CHECK_EQ(index, 71 CHECK_EQ(index,
72 TypeFeedbackVector::kReservedIndexCount + metadata_length + 3); 72 TypeFeedbackVector::kReservedIndexCount + metadata_length + 3);
73 CHECK(FeedbackVectorICSlot(0) == vector->ToICSlot(index)); 73 CHECK(FeedbackVectorICSlot(0) == vector->ToICSlot(index));
74 74 CHECK_EQ(TypeFeedbackVector::kReservedIndexCount + metadata_length + 3 +
75 CHECK_EQ(TypeFeedbackVector::kReservedIndexCount + metadata_length + 3 + 5, 75 5 * TypeFeedbackVector::elements_per_ic_slot(),
76 vector->length()); 76 vector->length());
77 } 77 }
78 78
79 79
80 // IC slots need an encoding to recognize what is in there. 80 // IC slots need an encoding to recognize what is in there.
81 TEST(VectorICMetadata) { 81 TEST(VectorICMetadata) {
82 LocalContext context; 82 LocalContext context;
83 v8::HandleScope scope(context->GetIsolate()); 83 v8::HandleScope scope(context->GetIsolate());
84 if (!FLAG_vector_ics) { 84 if (!FLAG_vector_ics) {
85 // If FLAG_vector_ics is false, we only store CALL_ICs in the vector, so 85 // If FLAG_vector_ics is false, we only store CALL_ICs in the vector, so
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 CHECK(number_map_found && o_map_found); 385 CHECK(number_map_found && o_map_found);
386 386
387 // The degree of polymorphism doesn't change. 387 // The degree of polymorphism doesn't change.
388 CompileRun("f(100)"); 388 CompileRun("f(100)");
389 CHECK_EQ(POLYMORPHIC, nexus.StateFromFeedback()); 389 CHECK_EQ(POLYMORPHIC, nexus.StateFromFeedback());
390 MapHandleList maps2; 390 MapHandleList maps2;
391 nexus.FindAllMaps(&maps2); 391 nexus.FindAllMaps(&maps2);
392 CHECK_EQ(2, maps2.length()); 392 CHECK_EQ(2, maps2.length());
393 } 393 }
394 } 394 }
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698