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

Side by Side Diff: src/assembler.cc

Issue 1474763008: Always pass an Isolate to AssemblerBase (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years 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/debug/arm/debug-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 (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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 AssemblerBase::AssemblerBase(Isolate* isolate, void* buffer, int buffer_size) 167 AssemblerBase::AssemblerBase(Isolate* isolate, void* buffer, int buffer_size)
168 : isolate_(isolate), 168 : isolate_(isolate),
169 jit_cookie_(0), 169 jit_cookie_(0),
170 enabled_cpu_features_(0), 170 enabled_cpu_features_(0),
171 emit_debug_code_(FLAG_debug_code), 171 emit_debug_code_(FLAG_debug_code),
172 predictable_code_size_(false), 172 predictable_code_size_(false),
173 // We may use the assembler without an isolate. 173 // We may use the assembler without an isolate.
174 serializer_enabled_(isolate && isolate->serializer_enabled()), 174 serializer_enabled_(isolate && isolate->serializer_enabled()),
175 constant_pool_available_(false) { 175 constant_pool_available_(false) {
176 if (FLAG_mask_constants_with_cookie && isolate != NULL) { 176 DCHECK_NOT_NULL(isolate);
177 if (FLAG_mask_constants_with_cookie) {
177 jit_cookie_ = isolate->random_number_generator()->NextInt(); 178 jit_cookie_ = isolate->random_number_generator()->NextInt();
178 } 179 }
179 own_buffer_ = buffer == NULL; 180 own_buffer_ = buffer == NULL;
180 if (buffer_size == 0) buffer_size = kMinimalBufferSize; 181 if (buffer_size == 0) buffer_size = kMinimalBufferSize;
181 DCHECK(buffer_size > 0); 182 DCHECK(buffer_size > 0);
182 if (own_buffer_) buffer = NewArray<byte>(buffer_size); 183 if (own_buffer_) buffer = NewArray<byte>(buffer_size);
183 buffer_ = static_cast<byte*>(buffer); 184 buffer_ = static_cast<byte*>(buffer);
184 buffer_size_ = buffer_size; 185 buffer_size_ = buffer_size;
185 186
186 pc_ = buffer_; 187 pc_ = buffer_;
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 1906
1906 1907
1907 void Assembler::DataAlign(int m) { 1908 void Assembler::DataAlign(int m) {
1908 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); 1909 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
1909 while ((pc_offset() & (m - 1)) != 0) { 1910 while ((pc_offset() & (m - 1)) != 0) {
1910 db(0); 1911 db(0);
1911 } 1912 }
1912 } 1913 }
1913 } // namespace internal 1914 } // namespace internal
1914 } // namespace v8 1915 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/debug/arm/debug-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698