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

Side by Side Diff: src/assembler.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 | « src/assembler.h ('k') | src/builtins/setup-builtins-internal.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 #else 183 #else
184 CpuFeatures::FlushICache(start, size); 184 CpuFeatures::FlushICache(start, size);
185 #endif // USE_SIMULATOR 185 #endif // USE_SIMULATOR
186 } 186 }
187 187
188 void AssemblerBase::Print(Isolate* isolate) { 188 void AssemblerBase::Print(Isolate* isolate) {
189 OFStream os(stdout); 189 OFStream os(stdout);
190 v8::internal::Disassembler::Decode(isolate, &os, buffer_, pc_, nullptr); 190 v8::internal::Disassembler::Decode(isolate, &os, buffer_, pc_, nullptr);
191 } 191 }
192 192
193 AssemblerBase::RequestedHeapNumber::RequestedHeapNumber(double value,
194 int offset)
195 : value(value), offset(offset) {
196 DCHECK(!IsSmiDouble(value));
197 }
198
199 void AssemblerBase::AllocateRequestedHeapNumbers(Isolate* isolate) {
200 for (auto& heap_number : heap_numbers_) {
201 Handle<HeapObject> object = isolate->factory()->NewHeapNumber(
202 heap_number.value, IMMUTABLE, TENURED);
203 Assembler::set_heap_number(object, buffer_ + heap_number.offset);
204 }
205 }
193 206
194 // ----------------------------------------------------------------------------- 207 // -----------------------------------------------------------------------------
195 // Implementation of PredictableCodeSizeScope 208 // Implementation of PredictableCodeSizeScope
196 209
197 PredictableCodeSizeScope::PredictableCodeSizeScope(AssemblerBase* assembler) 210 PredictableCodeSizeScope::PredictableCodeSizeScope(AssemblerBase* assembler)
198 : PredictableCodeSizeScope(assembler, -1) {} 211 : PredictableCodeSizeScope(assembler, -1) {}
199 212
200 213
201 PredictableCodeSizeScope::PredictableCodeSizeScope(AssemblerBase* assembler, 214 PredictableCodeSizeScope::PredictableCodeSizeScope(AssemblerBase* assembler,
202 int expected_size) 215 int expected_size)
(...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 RecordRelocInfo(mode); 1997 RecordRelocInfo(mode);
1985 } 1998 }
1986 1999
1987 2000
1988 void Assembler::DataAlign(int m) { 2001 void Assembler::DataAlign(int m) {
1989 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); 2002 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
1990 while ((pc_offset() & (m - 1)) != 0) { 2003 while ((pc_offset() & (m - 1)) != 0) {
1991 db(0); 2004 db(0);
1992 } 2005 }
1993 } 2006 }
2007
1994 } // namespace internal 2008 } // namespace internal
1995 } // namespace v8 2009 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/builtins/setup-builtins-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698