OLD | NEW |
1 // Copyright 2007-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2010 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_total_compile_size), | 114 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_total_compile_size), |
115 encoder.Encode(total_compile_size.address())); | 115 encoder.Encode(total_compile_size.address())); |
116 ExternalReference stack_limit_address = | 116 ExternalReference stack_limit_address = |
117 ExternalReference::address_of_stack_limit(isolate); | 117 ExternalReference::address_of_stack_limit(isolate); |
118 CHECK_EQ(make_code(UNCLASSIFIED, 4), | 118 CHECK_EQ(make_code(UNCLASSIFIED, 4), |
119 encoder.Encode(stack_limit_address.address())); | 119 encoder.Encode(stack_limit_address.address())); |
120 ExternalReference real_stack_limit_address = | 120 ExternalReference real_stack_limit_address = |
121 ExternalReference::address_of_real_stack_limit(isolate); | 121 ExternalReference::address_of_real_stack_limit(isolate); |
122 CHECK_EQ(make_code(UNCLASSIFIED, 5), | 122 CHECK_EQ(make_code(UNCLASSIFIED, 5), |
123 encoder.Encode(real_stack_limit_address.address())); | 123 encoder.Encode(real_stack_limit_address.address())); |
124 #ifdef ENABLE_DEBUGGER_SUPPORT | |
125 CHECK_EQ(make_code(UNCLASSIFIED, 16), | 124 CHECK_EQ(make_code(UNCLASSIFIED, 16), |
126 encoder.Encode(ExternalReference::debug_break(isolate).address())); | 125 encoder.Encode(ExternalReference::debug_break(isolate).address())); |
127 #endif // ENABLE_DEBUGGER_SUPPORT | |
128 CHECK_EQ(make_code(UNCLASSIFIED, 10), | 126 CHECK_EQ(make_code(UNCLASSIFIED, 10), |
129 encoder.Encode( | 127 encoder.Encode( |
130 ExternalReference::new_space_start(isolate).address())); | 128 ExternalReference::new_space_start(isolate).address())); |
131 CHECK_EQ(make_code(UNCLASSIFIED, 3), | 129 CHECK_EQ(make_code(UNCLASSIFIED, 3), |
132 encoder.Encode( | 130 encoder.Encode( |
133 ExternalReference::roots_array_start(isolate).address())); | 131 ExternalReference::roots_array_start(isolate).address())); |
134 CHECK_EQ(make_code(UNCLASSIFIED, 52), | 132 CHECK_EQ(make_code(UNCLASSIFIED, 52), |
135 encoder.Encode(ExternalReference::cpu_features().address())); | 133 encoder.Encode(ExternalReference::cpu_features().address())); |
136 } | 134 } |
137 | 135 |
(...skipping 12 matching lines...) Expand all Loading... |
150 ExternalReference total_compile_size = | 148 ExternalReference total_compile_size = |
151 ExternalReference(isolate->counters()->total_compile_size()); | 149 ExternalReference(isolate->counters()->total_compile_size()); |
152 CHECK_EQ(total_compile_size.address(), | 150 CHECK_EQ(total_compile_size.address(), |
153 decoder.Decode( | 151 decoder.Decode( |
154 make_code(STATS_COUNTER, | 152 make_code(STATS_COUNTER, |
155 Counters::k_total_compile_size))); | 153 Counters::k_total_compile_size))); |
156 CHECK_EQ(ExternalReference::address_of_stack_limit(isolate).address(), | 154 CHECK_EQ(ExternalReference::address_of_stack_limit(isolate).address(), |
157 decoder.Decode(make_code(UNCLASSIFIED, 4))); | 155 decoder.Decode(make_code(UNCLASSIFIED, 4))); |
158 CHECK_EQ(ExternalReference::address_of_real_stack_limit(isolate).address(), | 156 CHECK_EQ(ExternalReference::address_of_real_stack_limit(isolate).address(), |
159 decoder.Decode(make_code(UNCLASSIFIED, 5))); | 157 decoder.Decode(make_code(UNCLASSIFIED, 5))); |
160 #ifdef ENABLE_DEBUGGER_SUPPORT | |
161 CHECK_EQ(ExternalReference::debug_break(isolate).address(), | 158 CHECK_EQ(ExternalReference::debug_break(isolate).address(), |
162 decoder.Decode(make_code(UNCLASSIFIED, 16))); | 159 decoder.Decode(make_code(UNCLASSIFIED, 16))); |
163 #endif // ENABLE_DEBUGGER_SUPPORT | |
164 CHECK_EQ(ExternalReference::new_space_start(isolate).address(), | 160 CHECK_EQ(ExternalReference::new_space_start(isolate).address(), |
165 decoder.Decode(make_code(UNCLASSIFIED, 10))); | 161 decoder.Decode(make_code(UNCLASSIFIED, 10))); |
166 } | 162 } |
167 | 163 |
168 | 164 |
169 class FileByteSink : public SnapshotByteSink { | 165 class FileByteSink : public SnapshotByteSink { |
170 public: | 166 public: |
171 explicit FileByteSink(const char* snapshot_file) { | 167 explicit FileByteSink(const char* snapshot_file) { |
172 fp_ = OS::FOpen(snapshot_file, "wb"); | 168 fp_ = OS::FOpen(snapshot_file, "wb"); |
173 file_name_ = snapshot_file; | 169 file_name_ = snapshot_file; |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 TEST(TestThatAlwaysFails) { | 638 TEST(TestThatAlwaysFails) { |
643 bool ArtificialFailure = false; | 639 bool ArtificialFailure = false; |
644 CHECK(ArtificialFailure); | 640 CHECK(ArtificialFailure); |
645 } | 641 } |
646 | 642 |
647 | 643 |
648 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 644 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { |
649 bool ArtificialFailure2 = false; | 645 bool ArtificialFailure2 = false; |
650 CHECK(ArtificialFailure2); | 646 CHECK(ArtificialFailure2); |
651 } | 647 } |
OLD | NEW |