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

Side by Side Diff: src/x64/assembler-x64.cc

Issue 6677076: Merge up to bleeding_edge r7201 to isolates branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Fix lint. Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/code-stubs-x64.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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 331
332 // ----------------------------------------------------------------------------- 332 // -----------------------------------------------------------------------------
333 // Implementation of Assembler. 333 // Implementation of Assembler.
334 334
335 #ifdef GENERATED_CODE_COVERAGE 335 #ifdef GENERATED_CODE_COVERAGE
336 static void InitCoverageLog(); 336 static void InitCoverageLog();
337 #endif 337 #endif
338 338
339 Assembler::Assembler(void* buffer, int buffer_size) 339 Assembler::Assembler(void* buffer, int buffer_size)
340 : code_targets_(100), positions_recorder_(this) { 340 : code_targets_(100),
341 positions_recorder_(this),
342 emit_debug_code_(FLAG_debug_code) {
341 Isolate* isolate = Isolate::Current(); 343 Isolate* isolate = Isolate::Current();
342 if (buffer == NULL) { 344 if (buffer == NULL) {
343 // Do our own buffer management. 345 // Do our own buffer management.
344 if (buffer_size <= kMinimalBufferSize) { 346 if (buffer_size <= kMinimalBufferSize) {
345 buffer_size = kMinimalBufferSize; 347 buffer_size = kMinimalBufferSize;
346 348
347 if (isolate->assembler_spare_buffer() != NULL) { 349 if (isolate->assembler_spare_buffer() != NULL) {
348 buffer = isolate->assembler_spare_buffer(); 350 buffer = isolate->assembler_spare_buffer();
349 isolate->set_assembler_spare_buffer(NULL); 351 isolate->set_assembler_spare_buffer(NULL);
350 } 352 }
(...skipping 2760 matching lines...) Expand 10 before | Expand all | Expand 10 after
3111 3113
3112 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { 3114 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
3113 ASSERT(rmode != RelocInfo::NONE); 3115 ASSERT(rmode != RelocInfo::NONE);
3114 // Don't record external references unless the heap will be serialized. 3116 // Don't record external references unless the heap will be serialized.
3115 if (rmode == RelocInfo::EXTERNAL_REFERENCE) { 3117 if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
3116 #ifdef DEBUG 3118 #ifdef DEBUG
3117 if (!Serializer::enabled()) { 3119 if (!Serializer::enabled()) {
3118 Serializer::TooLateToEnableNow(); 3120 Serializer::TooLateToEnableNow();
3119 } 3121 }
3120 #endif 3122 #endif
3121 if (!Serializer::enabled() && !FLAG_debug_code) { 3123 if (!Serializer::enabled() && !emit_debug_code()) {
3122 return; 3124 return;
3123 } 3125 }
3124 } 3126 }
3125 RelocInfo rinfo(pc_, rmode, data); 3127 RelocInfo rinfo(pc_, rmode, data);
3126 reloc_info_writer.Write(&rinfo); 3128 reloc_info_writer.Write(&rinfo);
3127 } 3129 }
3128 3130
3129 void Assembler::RecordJSReturn() { 3131 void Assembler::RecordJSReturn() {
3130 positions_recorder()->WriteRecordedPositions(); 3132 positions_recorder()->WriteRecordedPositions();
3131 EnsureSpace ensure_space(this); 3133 EnsureSpace ensure_space(this);
(...skipping 25 matching lines...) Expand all
3157 // specially coded on x64 means that it is a relative 32 bit address, as used 3159 // specially coded on x64 means that it is a relative 32 bit address, as used
3158 // by branch instructions. 3160 // by branch instructions.
3159 return (1 << rmode_) & kApplyMask; 3161 return (1 << rmode_) & kApplyMask;
3160 } 3162 }
3161 3163
3162 3164
3163 3165
3164 } } // namespace v8::internal 3166 } } // namespace v8::internal
3165 3167
3166 #endif // V8_TARGET_ARCH_X64 3168 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698