OLD | NEW |
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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 const Instr kLwSwInstrTypeMask = 0xffe00000; | 265 const Instr kLwSwInstrTypeMask = 0xffe00000; |
266 const Instr kLwSwInstrArgumentMask = ~kLwSwInstrTypeMask; | 266 const Instr kLwSwInstrArgumentMask = ~kLwSwInstrTypeMask; |
267 const Instr kLwSwOffsetMask = kImm16Mask; | 267 const Instr kLwSwOffsetMask = kImm16Mask; |
268 | 268 |
269 | 269 |
270 // Spare buffer. | 270 // Spare buffer. |
271 static const int kMinimalBufferSize = 4 * KB; | 271 static const int kMinimalBufferSize = 4 * KB; |
272 | 272 |
273 | 273 |
274 Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) | 274 Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) |
275 : AssemblerBase(arg_isolate), | 275 : AssemblerBase(arg_isolate, arg_isolate->zone()), |
276 positions_recorder_(this), | 276 positions_recorder_(this), |
277 emit_debug_code_(FLAG_debug_code) { | 277 emit_debug_code_(FLAG_debug_code) { |
278 if (buffer == NULL) { | 278 if (buffer == NULL) { |
279 // Do our own buffer management. | 279 // Do our own buffer management. |
280 if (buffer_size <= kMinimalBufferSize) { | 280 if (buffer_size <= kMinimalBufferSize) { |
281 buffer_size = kMinimalBufferSize; | 281 buffer_size = kMinimalBufferSize; |
282 | 282 |
283 if (isolate()->assembler_spare_buffer() != NULL) { | 283 if (isolate()->assembler_spare_buffer() != NULL) { |
284 buffer = isolate()->assembler_spare_buffer(); | 284 buffer = isolate()->assembler_spare_buffer(); |
285 isolate()->set_assembler_spare_buffer(NULL); | 285 isolate()->set_assembler_spare_buffer(NULL); |
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2279 } | 2279 } |
2280 | 2280 |
2281 if (patched) { | 2281 if (patched) { |
2282 CPU::FlushICache(pc+2, sizeof(Address)); | 2282 CPU::FlushICache(pc+2, sizeof(Address)); |
2283 } | 2283 } |
2284 } | 2284 } |
2285 | 2285 |
2286 } } // namespace v8::internal | 2286 } } // namespace v8::internal |
2287 | 2287 |
2288 #endif // V8_TARGET_ARCH_MIPS | 2288 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |