| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 CHECK_EQ(make_code(UNCLASSIFIED, 2), | 124 CHECK_EQ(make_code(UNCLASSIFIED, 2), |
| 125 encoder.Encode(the_hole_value_location.address())); | 125 encoder.Encode(the_hole_value_location.address())); |
| 126 ExternalReference stack_limit_address = | 126 ExternalReference stack_limit_address = |
| 127 ExternalReference::address_of_stack_limit(); | 127 ExternalReference::address_of_stack_limit(); |
| 128 CHECK_EQ(make_code(UNCLASSIFIED, 4), | 128 CHECK_EQ(make_code(UNCLASSIFIED, 4), |
| 129 encoder.Encode(stack_limit_address.address())); | 129 encoder.Encode(stack_limit_address.address())); |
| 130 ExternalReference real_stack_limit_address = | 130 ExternalReference real_stack_limit_address = |
| 131 ExternalReference::address_of_real_stack_limit(); | 131 ExternalReference::address_of_real_stack_limit(); |
| 132 CHECK_EQ(make_code(UNCLASSIFIED, 5), | 132 CHECK_EQ(make_code(UNCLASSIFIED, 5), |
| 133 encoder.Encode(real_stack_limit_address.address())); | 133 encoder.Encode(real_stack_limit_address.address())); |
| 134 CHECK_EQ(make_code(UNCLASSIFIED, 12), | 134 CHECK_EQ(make_code(UNCLASSIFIED, 15), |
| 135 encoder.Encode(ExternalReference::debug_break().address())); | 135 encoder.Encode(ExternalReference::debug_break().address())); |
| 136 CHECK_EQ(make_code(UNCLASSIFIED, 7), | 136 CHECK_EQ(make_code(UNCLASSIFIED, 10), |
| 137 encoder.Encode(ExternalReference::new_space_start().address())); | 137 encoder.Encode(ExternalReference::new_space_start().address())); |
| 138 CHECK_EQ(make_code(UNCLASSIFIED, 3), | 138 CHECK_EQ(make_code(UNCLASSIFIED, 3), |
| 139 encoder.Encode(ExternalReference::roots_address().address())); | 139 encoder.Encode(ExternalReference::roots_address().address())); |
| 140 } | 140 } |
| 141 | 141 |
| 142 | 142 |
| 143 TEST(ExternalReferenceDecoder) { | 143 TEST(ExternalReferenceDecoder) { |
| 144 StatsTable::SetCounterFunction(counter_function); | 144 StatsTable::SetCounterFunction(counter_function); |
| 145 Heap::Setup(false); | 145 Heap::Setup(false); |
| 146 ExternalReferenceDecoder decoder; | 146 ExternalReferenceDecoder decoder; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 158 decoder.Decode( | 158 decoder.Decode( |
| 159 make_code(STATS_COUNTER, | 159 make_code(STATS_COUNTER, |
| 160 Counters::k_keyed_load_function_prototype))); | 160 Counters::k_keyed_load_function_prototype))); |
| 161 CHECK_EQ(ExternalReference::the_hole_value_location().address(), | 161 CHECK_EQ(ExternalReference::the_hole_value_location().address(), |
| 162 decoder.Decode(make_code(UNCLASSIFIED, 2))); | 162 decoder.Decode(make_code(UNCLASSIFIED, 2))); |
| 163 CHECK_EQ(ExternalReference::address_of_stack_limit().address(), | 163 CHECK_EQ(ExternalReference::address_of_stack_limit().address(), |
| 164 decoder.Decode(make_code(UNCLASSIFIED, 4))); | 164 decoder.Decode(make_code(UNCLASSIFIED, 4))); |
| 165 CHECK_EQ(ExternalReference::address_of_real_stack_limit().address(), | 165 CHECK_EQ(ExternalReference::address_of_real_stack_limit().address(), |
| 166 decoder.Decode(make_code(UNCLASSIFIED, 5))); | 166 decoder.Decode(make_code(UNCLASSIFIED, 5))); |
| 167 CHECK_EQ(ExternalReference::debug_break().address(), | 167 CHECK_EQ(ExternalReference::debug_break().address(), |
| 168 decoder.Decode(make_code(UNCLASSIFIED, 12))); | 168 decoder.Decode(make_code(UNCLASSIFIED, 15))); |
| 169 CHECK_EQ(ExternalReference::new_space_start().address(), | 169 CHECK_EQ(ExternalReference::new_space_start().address(), |
| 170 decoder.Decode(make_code(UNCLASSIFIED, 7))); | 170 decoder.Decode(make_code(UNCLASSIFIED, 10))); |
| 171 } | 171 } |
| 172 | 172 |
| 173 | 173 |
| 174 class FileByteSink : public SnapshotByteSink { | 174 class FileByteSink : public SnapshotByteSink { |
| 175 public: | 175 public: |
| 176 explicit FileByteSink(const char* snapshot_file) { | 176 explicit FileByteSink(const char* snapshot_file) { |
| 177 fp_ = OS::FOpen(snapshot_file, "wb"); | 177 fp_ = OS::FOpen(snapshot_file, "wb"); |
| 178 file_name_ = snapshot_file; | 178 file_name_ = snapshot_file; |
| 179 if (fp_ == NULL) { | 179 if (fp_ == NULL) { |
| 180 PrintF("Unable to write to snapshot file \"%s\"\n", snapshot_file); | 180 PrintF("Unable to write to snapshot file \"%s\"\n", snapshot_file); |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 TEST(TestThatAlwaysFails) { | 663 TEST(TestThatAlwaysFails) { |
| 664 bool ArtificialFailure = false; | 664 bool ArtificialFailure = false; |
| 665 CHECK(ArtificialFailure); | 665 CHECK(ArtificialFailure); |
| 666 } | 666 } |
| 667 | 667 |
| 668 | 668 |
| 669 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 669 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { |
| 670 bool ArtificialFailure2 = false; | 670 bool ArtificialFailure2 = false; |
| 671 CHECK(ArtificialFailure2); | 671 CHECK(ArtificialFailure2); |
| 672 } | 672 } |
| OLD | NEW |