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

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

Issue 2900683002: [compiler] Delay allocation of code-embedded heap numbers. (Closed)
Patch Set: Fix rebase. Created 3 years, 6 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-disasm-x64.cc ('k') | test/cctest/test-macro-assembler-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 Factory* factory = isolate->factory(); 119 Factory* factory = isolate->factory();
120 HandleScope scope(isolate); 120 HandleScope scope(isolate);
121 121
122 v8::internal::byte buffer[2048]; 122 v8::internal::byte buffer[2048];
123 MacroAssembler masm(CcTest::i_isolate(), buffer, sizeof(buffer), 123 MacroAssembler masm(CcTest::i_isolate(), buffer, sizeof(buffer),
124 v8::internal::CodeObjectRequired::kYes); 124 v8::internal::CodeObjectRequired::kYes);
125 125
126 generate(&masm, key); 126 generate(&masm, key);
127 127
128 CodeDesc desc; 128 CodeDesc desc;
129 masm.GetCode(&desc); 129 masm.GetCode(isolate, &desc);
130 Handle<Object> undefined(isolate->heap()->undefined_value(), isolate); 130 Handle<Object> undefined(isolate->heap()->undefined_value(), isolate);
131 Handle<Code> code = factory->NewCode(desc, 131 Handle<Code> code = factory->NewCode(desc,
132 Code::ComputeFlags(Code::STUB), 132 Code::ComputeFlags(Code::STUB),
133 undefined); 133 undefined);
134 CHECK(code->IsCode()); 134 CHECK(code->IsCode());
135 135
136 HASH_FUNCTION hash = FUNCTION_CAST<HASH_FUNCTION>(code->entry()); 136 HASH_FUNCTION hash = FUNCTION_CAST<HASH_FUNCTION>(code->entry());
137 #ifdef USE_SIMULATOR 137 #ifdef USE_SIMULATOR
138 uint32_t codegen_hash = static_cast<uint32_t>(reinterpret_cast<uintptr_t>( 138 uint32_t codegen_hash = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(
139 CALL_GENERATED_CODE(isolate, hash, 0, 0, 0, 0, 0))); 139 CALL_GENERATED_CODE(isolate, hash, 0, 0, 0, 0, 0)));
(...skipping 24 matching lines...) Expand all
164 // Some pseudo-random numbers 164 // Some pseudo-random numbers
165 static const uint32_t kLimit = 1000; 165 static const uint32_t kLimit = 1000;
166 for (uint32_t i = 0; i < 5; i++) { 166 for (uint32_t i = 0; i < 5; i++) {
167 for (uint32_t j = 0; j < 5; j++) { 167 for (uint32_t j = 0; j < 5; j++) {
168 check(PseudoRandom(i, j) % kLimit); 168 check(PseudoRandom(i, j) % kLimit);
169 } 169 }
170 } 170 }
171 } 171 }
172 172
173 #undef __ 173 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-disasm-x64.cc ('k') | test/cctest/test-macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698