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

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 14678006: MIPS: Pretenure ASCII cons string in high promotion mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed register name Created 7 years, 7 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/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3117 matching lines...) Expand 10 before | Expand all | Expand 10 after
3128 scratch1, 3128 scratch1,
3129 scratch2); 3129 scratch2);
3130 } 3130 }
3131 3131
3132 3132
3133 void MacroAssembler::AllocateAsciiConsString(Register result, 3133 void MacroAssembler::AllocateAsciiConsString(Register result,
3134 Register length, 3134 Register length,
3135 Register scratch1, 3135 Register scratch1,
3136 Register scratch2, 3136 Register scratch2,
3137 Label* gc_required) { 3137 Label* gc_required) {
3138 Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required, 3138 Label allocate_new_space, install_map;
3139 TAG_OBJECT); 3139 AllocationFlags flags = TAG_OBJECT;
3140
3141 ExternalReference high_promotion_mode = ExternalReference::
3142 new_space_high_promotion_mode_active_address(isolate());
3143 li(scratch1, Operand(high_promotion_mode));
3144 lw(scratch1, MemOperand(scratch1, 0));
3145 Branch(&allocate_new_space, eq, scratch1, Operand(zero_reg));
3146
3147 Allocate(ConsString::kSize,
3148 result,
3149 scratch1,
3150 scratch2,
3151 gc_required,
3152 static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE));
3153
3154 jmp(&install_map);
3155
3156 bind(&allocate_new_space);
3157 Allocate(ConsString::kSize,
3158 result,
3159 scratch1,
3160 scratch2,
3161 gc_required,
3162 flags);
3163
3164 bind(&install_map);
3165
3140 InitializeNewString(result, 3166 InitializeNewString(result,
3141 length, 3167 length,
3142 Heap::kConsAsciiStringMapRootIndex, 3168 Heap::kConsAsciiStringMapRootIndex,
3143 scratch1, 3169 scratch1,
3144 scratch2); 3170 scratch2);
3145 } 3171 }
3146 3172
3147 3173
3148 void MacroAssembler::AllocateTwoByteSlicedString(Register result, 3174 void MacroAssembler::AllocateTwoByteSlicedString(Register result,
3149 Register length, 3175 Register length,
(...skipping 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after
5511 opcode == BGTZL); 5537 opcode == BGTZL);
5512 opcode = (cond == eq) ? BEQ : BNE; 5538 opcode = (cond == eq) ? BEQ : BNE;
5513 instr = (instr & ~kOpcodeMask) | opcode; 5539 instr = (instr & ~kOpcodeMask) | opcode;
5514 masm_.emit(instr); 5540 masm_.emit(instr);
5515 } 5541 }
5516 5542
5517 5543
5518 } } // namespace v8::internal 5544 } } // namespace v8::internal
5519 5545
5520 #endif // V8_TARGET_ARCH_MIPS 5546 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698