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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.cc

Issue 1288923002: Revert of [runtime] Remove useless IN builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 3322 matching lines...) Expand 10 before | Expand all | Expand 10 after
3333 Label* fall_through = NULL; 3333 Label* fall_through = NULL;
3334 context()->PrepareTest(&materialize_true, &materialize_false, 3334 context()->PrepareTest(&materialize_true, &materialize_false,
3335 &if_true, &if_false, &fall_through); 3335 &if_true, &if_false, &fall_through);
3336 3336
3337 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3337 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3338 __ SmiTst(v0, a4); 3338 __ SmiTst(v0, a4);
3339 Split(eq, a4, Operand(zero_reg), if_true, if_false, fall_through); 3339 Split(eq, a4, Operand(zero_reg), if_true, if_false, fall_through);
3340 3340
3341 context()->Plug(if_true, if_false); 3341 context()->Plug(if_true, if_false);
3342 } 3342 }
3343
3344
3345 void FullCodeGenerator::EmitIsNonNegativeSmi(CallRuntime* expr) {
3346 ZoneList<Expression*>* args = expr->arguments();
3347 DCHECK(args->length() == 1);
3348
3349 VisitForAccumulatorValue(args->at(0));
3350
3351 Label materialize_true, materialize_false;
3352 Label* if_true = NULL;
3353 Label* if_false = NULL;
3354 Label* fall_through = NULL;
3355 context()->PrepareTest(&materialize_true, &materialize_false,
3356 &if_true, &if_false, &fall_through);
3357
3358 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3359 __ NonNegativeSmiTst(v0, at);
3360 Split(eq, at, Operand(zero_reg), if_true, if_false, fall_through);
3361
3362 context()->Plug(if_true, if_false);
3363 }
3343 3364
3344 3365
3345 void FullCodeGenerator::EmitIsObject(CallRuntime* expr) { 3366 void FullCodeGenerator::EmitIsObject(CallRuntime* expr) {
3346 ZoneList<Expression*>* args = expr->arguments(); 3367 ZoneList<Expression*>* args = expr->arguments();
3347 DCHECK(args->length() == 1); 3368 DCHECK(args->length() == 1);
3348 3369
3349 VisitForAccumulatorValue(args->at(0)); 3370 VisitForAccumulatorValue(args->at(0));
3350 3371
3351 Label materialize_true, materialize_false; 3372 Label materialize_true, materialize_false;
3352 Label* if_true = NULL; 3373 Label* if_true = NULL;
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after
5085 Label* if_false = NULL; 5106 Label* if_false = NULL;
5086 Label* fall_through = NULL; 5107 Label* fall_through = NULL;
5087 context()->PrepareTest(&materialize_true, &materialize_false, 5108 context()->PrepareTest(&materialize_true, &materialize_false,
5088 &if_true, &if_false, &fall_through); 5109 &if_true, &if_false, &fall_through);
5089 5110
5090 Token::Value op = expr->op(); 5111 Token::Value op = expr->op();
5091 VisitForStackValue(expr->left()); 5112 VisitForStackValue(expr->left());
5092 switch (op) { 5113 switch (op) {
5093 case Token::IN: 5114 case Token::IN:
5094 VisitForStackValue(expr->right()); 5115 VisitForStackValue(expr->right());
5095 __ CallRuntime(Runtime::kHasProperty, 2); 5116 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION);
5096 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 5117 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
5097 __ LoadRoot(a4, Heap::kTrueValueRootIndex); 5118 __ LoadRoot(a4, Heap::kTrueValueRootIndex);
5098 Split(eq, v0, Operand(a4), if_true, if_false, fall_through); 5119 Split(eq, v0, Operand(a4), if_true, if_false, fall_through);
5099 break; 5120 break;
5100 5121
5101 case Token::INSTANCEOF: { 5122 case Token::INSTANCEOF: {
5102 VisitForStackValue(expr->right()); 5123 VisitForStackValue(expr->right());
5103 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); 5124 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags);
5104 __ CallStub(&stub); 5125 __ CallStub(&stub);
5105 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 5126 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
5361 reinterpret_cast<uint64_t>( 5382 reinterpret_cast<uint64_t>(
5362 isolate->builtins()->OsrAfterStackCheck()->entry())); 5383 isolate->builtins()->OsrAfterStackCheck()->entry()));
5363 return OSR_AFTER_STACK_CHECK; 5384 return OSR_AFTER_STACK_CHECK;
5364 } 5385 }
5365 5386
5366 5387
5367 } // namespace internal 5388 } // namespace internal
5368 } // namespace v8 5389 } // namespace v8
5369 5390
5370 #endif // V8_TARGET_ARCH_MIPS64 5391 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698