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

Side by Side Diff: src/s390/code-stubs-s390.cc

Issue 2380973002: [stubs] replaced ToString MacroAssembler Stub with CodeStubAssembler builtin (Closed)
Patch Set: completely removed ToStringStub Created 4 years, 2 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #if V8_TARGET_ARCH_S390 5 #if V8_TARGET_ARCH_S390
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2424 // r5: from index (untagged) 2424 // r5: from index (untagged)
2425 __ SmiTag(r5, r5); 2425 __ SmiTag(r5, r5);
2426 StringCharAtGenerator generator(r2, r5, r4, r2, &runtime, &runtime, &runtime, 2426 StringCharAtGenerator generator(r2, r5, r4, r2, &runtime, &runtime, &runtime,
2427 RECEIVER_IS_STRING); 2427 RECEIVER_IS_STRING);
2428 generator.GenerateFast(masm); 2428 generator.GenerateFast(masm);
2429 __ Drop(3); 2429 __ Drop(3);
2430 __ Ret(); 2430 __ Ret();
2431 generator.SkipSlow(masm, &runtime); 2431 generator.SkipSlow(masm, &runtime);
2432 } 2432 }
2433 2433
2434 void ToStringStub::Generate(MacroAssembler* masm) {
2435 // The ToString stub takes one argument in r2.
2436 Label done;
2437 Label is_number;
2438 __ JumpIfSmi(r2, &is_number);
2439
2440 __ CompareObjectType(r2, r3, r3, FIRST_NONSTRING_TYPE);
2441 // r2: receiver
2442 // r3: receiver instance type
2443 __ blt(&done);
2444
2445 Label not_heap_number;
2446 __ CmpP(r3, Operand(HEAP_NUMBER_TYPE));
2447 __ bne(&not_heap_number);
2448 __ bind(&is_number);
2449 NumberToStringStub stub(isolate());
2450 __ TailCallStub(&stub);
2451 __ bind(&not_heap_number);
2452
2453 Label not_oddball;
2454 __ CmpP(r3, Operand(ODDBALL_TYPE));
2455 __ bne(&not_oddball);
2456 __ LoadP(r2, FieldMemOperand(r2, Oddball::kToStringOffset));
2457 __ Ret();
2458 __ bind(&not_oddball);
2459
2460 __ push(r2); // Push argument.
2461 __ TailCallRuntime(Runtime::kToString);
2462
2463 __ bind(&done);
2464 __ Ret();
2465 }
2466
2467 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, 2434 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm,
2468 Register left, 2435 Register left,
2469 Register right, 2436 Register right,
2470 Register scratch1, 2437 Register scratch1,
2471 Register scratch2) { 2438 Register scratch2) {
2472 Register length = scratch1; 2439 Register length = scratch1;
2473 2440
2474 // Compare lengths. 2441 // Compare lengths.
2475 Label strings_not_equal, check_zero_length; 2442 Label strings_not_equal, check_zero_length;
2476 __ LoadP(length, FieldMemOperand(left, String::kLengthOffset)); 2443 __ LoadP(length, FieldMemOperand(left, String::kLengthOffset));
(...skipping 2878 matching lines...) Expand 10 before | Expand all | Expand 10 after
5355 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5322 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5356 kStackUnwindSpace, NULL, return_value_operand, NULL); 5323 kStackUnwindSpace, NULL, return_value_operand, NULL);
5357 } 5324 }
5358 5325
5359 #undef __ 5326 #undef __
5360 5327
5361 } // namespace internal 5328 } // namespace internal
5362 } // namespace v8 5329 } // namespace v8
5363 5330
5364 #endif // V8_TARGET_ARCH_S390 5331 #endif // V8_TARGET_ARCH_S390
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698