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

Side by Side Diff: src/arm/macro-assembler-arm.h

Issue 1335193002: [builtins] Simplify String constructor code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Jaro's comments. Created 5 years, 3 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
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/macro-assembler-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ 5 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_
6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ 6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 Condition cond = al); 157 Condition cond = al);
158 void Bfc(Register dst, Register src, int lsb, int width, Condition cond = al); 158 void Bfc(Register dst, Register src, int lsb, int width, Condition cond = al);
159 void Usat(Register dst, int satpos, const Operand& src, 159 void Usat(Register dst, int satpos, const Operand& src,
160 Condition cond = al); 160 Condition cond = al);
161 161
162 void Call(Label* target); 162 void Call(Label* target);
163 void Push(Register src) { push(src); } 163 void Push(Register src) { push(src); }
164 void Pop(Register dst) { pop(dst); } 164 void Pop(Register dst) { pop(dst); }
165 165
166 // Register move. May do nothing if the registers are identical. 166 // Register move. May do nothing if the registers are identical.
167 void Move(Register dst, Smi* smi) { mov(dst, Operand(smi)); }
167 void Move(Register dst, Handle<Object> value); 168 void Move(Register dst, Handle<Object> value);
168 void Move(Register dst, Register src, Condition cond = al); 169 void Move(Register dst, Register src, Condition cond = al);
169 void Move(Register dst, const Operand& src, SBit sbit = LeaveCC, 170 void Move(Register dst, const Operand& src, SBit sbit = LeaveCC,
170 Condition cond = al) { 171 Condition cond = al) {
171 if (!src.is_reg() || !src.rm().is(dst) || sbit != LeaveCC) { 172 if (!src.is_reg() || !src.rm().is(dst) || sbit != LeaveCC) {
172 mov(dst, src, sbit, cond); 173 mov(dst, src, sbit, cond);
173 } 174 }
174 } 175 }
175 void Move(DwVfpRegister dst, DwVfpRegister src); 176 void Move(DwVfpRegister dst, DwVfpRegister src);
176 177
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 // HeapNumber utilities 1323 // HeapNumber utilities
1323 1324
1324 void JumpIfNotHeapNumber(Register object, 1325 void JumpIfNotHeapNumber(Register object,
1325 Register heap_number_map, 1326 Register heap_number_map,
1326 Register scratch, 1327 Register scratch,
1327 Label* on_not_heap_number); 1328 Label* on_not_heap_number);
1328 1329
1329 // --------------------------------------------------------------------------- 1330 // ---------------------------------------------------------------------------
1330 // String utilities 1331 // String utilities
1331 1332
1332 // Generate code to do a lookup in the number string cache. If the number in
1333 // the register object is found in the cache the generated code falls through
1334 // with the result in the result register. The object and the result register
1335 // can be the same. If the number is not found in the cache the code jumps to
1336 // the label not_found with only the content of register object unchanged.
1337 void LookupNumberStringCache(Register object,
1338 Register result,
1339 Register scratch1,
1340 Register scratch2,
1341 Register scratch3,
1342 Label* not_found);
1343
1344 // Checks if both objects are sequential one-byte strings and jumps to label 1333 // Checks if both objects are sequential one-byte strings and jumps to label
1345 // if either is not. Assumes that neither object is a smi. 1334 // if either is not. Assumes that neither object is a smi.
1346 void JumpIfNonSmisNotBothSequentialOneByteStrings(Register object1, 1335 void JumpIfNonSmisNotBothSequentialOneByteStrings(Register object1,
1347 Register object2, 1336 Register object2,
1348 Register scratch1, 1337 Register scratch1,
1349 Register scratch2, 1338 Register scratch2,
1350 Label* failure); 1339 Label* failure);
1351 1340
1352 // Checks if both objects are sequential one-byte strings and jumps to label 1341 // Checks if both objects are sequential one-byte strings and jumps to label
1353 // if either is not. 1342 // if either is not.
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1557 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1569 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1558 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1570 #else 1559 #else
1571 #define ACCESS_MASM(masm) masm-> 1560 #define ACCESS_MASM(masm) masm->
1572 #endif 1561 #endif
1573 1562
1574 1563
1575 } } // namespace v8::internal 1564 } } // namespace v8::internal
1576 1565
1577 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 1566 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698