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

Side by Side Diff: test/cctest/test-serialize.cc

Issue 536065: Optimized calling of C++ builtins (and HandleApiCall (Closed)
Patch Set: Created 10 years, 11 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 | « test/cctest/test-api.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 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 CHECK_EQ(make_code(RUNTIME_FUNCTION, Runtime::kAbort), 110 CHECK_EQ(make_code(RUNTIME_FUNCTION, Runtime::kAbort),
111 Encode(encoder, Runtime::kAbort)); 111 Encode(encoder, Runtime::kAbort));
112 CHECK_EQ(make_code(IC_UTILITY, IC::kLoadCallbackProperty), 112 CHECK_EQ(make_code(IC_UTILITY, IC::kLoadCallbackProperty),
113 Encode(encoder, IC_Utility(IC::kLoadCallbackProperty))); 113 Encode(encoder, IC_Utility(IC::kLoadCallbackProperty)));
114 CHECK_EQ(make_code(DEBUG_ADDRESS, register_code(3)), 114 CHECK_EQ(make_code(DEBUG_ADDRESS, register_code(3)),
115 Encode(encoder, Debug_Address(Debug::k_register_address, 3))); 115 Encode(encoder, Debug_Address(Debug::k_register_address, 3)));
116 ExternalReference keyed_load_function_prototype = 116 ExternalReference keyed_load_function_prototype =
117 ExternalReference(&Counters::keyed_load_function_prototype); 117 ExternalReference(&Counters::keyed_load_function_prototype);
118 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_keyed_load_function_prototype), 118 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_keyed_load_function_prototype),
119 encoder.Encode(keyed_load_function_prototype.address())); 119 encoder.Encode(keyed_load_function_prototype.address()));
120 ExternalReference passed_function =
121 ExternalReference::builtin_passed_function();
122 CHECK_EQ(make_code(UNCLASSIFIED, 1),
123 encoder.Encode(passed_function.address()));
124 ExternalReference the_hole_value_location = 120 ExternalReference the_hole_value_location =
125 ExternalReference::the_hole_value_location(); 121 ExternalReference::the_hole_value_location();
126 CHECK_EQ(make_code(UNCLASSIFIED, 2), 122 CHECK_EQ(make_code(UNCLASSIFIED, 2),
127 encoder.Encode(the_hole_value_location.address())); 123 encoder.Encode(the_hole_value_location.address()));
128 ExternalReference stack_limit_address = 124 ExternalReference stack_limit_address =
129 ExternalReference::address_of_stack_limit(); 125 ExternalReference::address_of_stack_limit();
130 CHECK_EQ(make_code(UNCLASSIFIED, 4), 126 CHECK_EQ(make_code(UNCLASSIFIED, 4),
131 encoder.Encode(stack_limit_address.address())); 127 encoder.Encode(stack_limit_address.address()));
132 ExternalReference real_stack_limit_address = 128 ExternalReference real_stack_limit_address =
133 ExternalReference::address_of_real_stack_limit(); 129 ExternalReference::address_of_real_stack_limit();
(...skipping 19 matching lines...) Expand all
153 CHECK_EQ(AddressOf(IC_Utility(IC::kLoadCallbackProperty)), 149 CHECK_EQ(AddressOf(IC_Utility(IC::kLoadCallbackProperty)),
154 decoder.Decode(make_code(IC_UTILITY, IC::kLoadCallbackProperty))); 150 decoder.Decode(make_code(IC_UTILITY, IC::kLoadCallbackProperty)));
155 CHECK_EQ(AddressOf(Debug_Address(Debug::k_register_address, 3)), 151 CHECK_EQ(AddressOf(Debug_Address(Debug::k_register_address, 3)),
156 decoder.Decode(make_code(DEBUG_ADDRESS, register_code(3)))); 152 decoder.Decode(make_code(DEBUG_ADDRESS, register_code(3))));
157 ExternalReference keyed_load_function = 153 ExternalReference keyed_load_function =
158 ExternalReference(&Counters::keyed_load_function_prototype); 154 ExternalReference(&Counters::keyed_load_function_prototype);
159 CHECK_EQ(keyed_load_function.address(), 155 CHECK_EQ(keyed_load_function.address(),
160 decoder.Decode( 156 decoder.Decode(
161 make_code(STATS_COUNTER, 157 make_code(STATS_COUNTER,
162 Counters::k_keyed_load_function_prototype))); 158 Counters::k_keyed_load_function_prototype)));
163 CHECK_EQ(ExternalReference::builtin_passed_function().address(),
164 decoder.Decode(make_code(UNCLASSIFIED, 1)));
165 CHECK_EQ(ExternalReference::the_hole_value_location().address(), 159 CHECK_EQ(ExternalReference::the_hole_value_location().address(),
166 decoder.Decode(make_code(UNCLASSIFIED, 2))); 160 decoder.Decode(make_code(UNCLASSIFIED, 2)));
167 CHECK_EQ(ExternalReference::address_of_stack_limit().address(), 161 CHECK_EQ(ExternalReference::address_of_stack_limit().address(),
168 decoder.Decode(make_code(UNCLASSIFIED, 4))); 162 decoder.Decode(make_code(UNCLASSIFIED, 4)));
169 CHECK_EQ(ExternalReference::address_of_real_stack_limit().address(), 163 CHECK_EQ(ExternalReference::address_of_real_stack_limit().address(),
170 decoder.Decode(make_code(UNCLASSIFIED, 5))); 164 decoder.Decode(make_code(UNCLASSIFIED, 5)));
171 CHECK_EQ(ExternalReference::debug_break().address(), 165 CHECK_EQ(ExternalReference::debug_break().address(),
172 decoder.Decode(make_code(UNCLASSIFIED, 11))); 166 decoder.Decode(make_code(UNCLASSIFIED, 11)));
173 CHECK_EQ(ExternalReference::new_space_start().address(), 167 CHECK_EQ(ExternalReference::new_space_start().address(),
174 decoder.Decode(make_code(UNCLASSIFIED, 7))); 168 decoder.Decode(make_code(UNCLASSIFIED, 7)));
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 TEST(TestThatAlwaysFails) { 415 TEST(TestThatAlwaysFails) {
422 bool ArtificialFailure = false; 416 bool ArtificialFailure = false;
423 CHECK(ArtificialFailure); 417 CHECK(ArtificialFailure);
424 } 418 }
425 419
426 420
427 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { 421 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) {
428 bool ArtificialFailure2 = false; 422 bool ArtificialFailure2 = false;
429 CHECK(ArtificialFailure2); 423 CHECK(ArtificialFailure2);
430 } 424 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698