OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 // ----------------------------------------------------------------------------- | 342 // ----------------------------------------------------------------------------- |
343 // Implementation of Assembler. | 343 // Implementation of Assembler. |
344 | 344 |
345 #ifdef GENERATED_CODE_COVERAGE | 345 #ifdef GENERATED_CODE_COVERAGE |
346 static void InitCoverageLog(); | 346 static void InitCoverageLog(); |
347 #endif | 347 #endif |
348 | 348 |
349 Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) | 349 Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) |
350 : AssemblerBase(arg_isolate), | 350 : AssemblerBase(arg_isolate), |
351 code_targets_(100), | 351 code_targets_(100), |
352 positions_recorder_(this), | 352 positions_recorder_(this) { |
353 emit_debug_code_(FLAG_debug_code) { | |
354 if (buffer == NULL) { | 353 if (buffer == NULL) { |
355 // Do our own buffer management. | 354 // Do our own buffer management. |
356 if (buffer_size <= kMinimalBufferSize) { | 355 if (buffer_size <= kMinimalBufferSize) { |
357 buffer_size = kMinimalBufferSize; | 356 buffer_size = kMinimalBufferSize; |
358 | 357 |
359 if (isolate() != NULL && isolate()->assembler_spare_buffer() != NULL) { | 358 if (isolate() != NULL && isolate()->assembler_spare_buffer() != NULL) { |
360 buffer = isolate()->assembler_spare_buffer(); | 359 buffer = isolate()->assembler_spare_buffer(); |
361 isolate()->set_assembler_spare_buffer(NULL); | 360 isolate()->set_assembler_spare_buffer(NULL); |
362 } | 361 } |
363 } | 362 } |
(...skipping 2689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3053 bool RelocInfo::IsCodedSpecially() { | 3052 bool RelocInfo::IsCodedSpecially() { |
3054 // The deserializer needs to know whether a pointer is specially coded. Being | 3053 // The deserializer needs to know whether a pointer is specially coded. Being |
3055 // specially coded on x64 means that it is a relative 32 bit address, as used | 3054 // specially coded on x64 means that it is a relative 32 bit address, as used |
3056 // by branch instructions. | 3055 // by branch instructions. |
3057 return (1 << rmode_) & kApplyMask; | 3056 return (1 << rmode_) & kApplyMask; |
3058 } | 3057 } |
3059 | 3058 |
3060 } } // namespace v8::internal | 3059 } } // namespace v8::internal |
3061 | 3060 |
3062 #endif // V8_TARGET_ARCH_X64 | 3061 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |