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/full-codegen/mips64/full-codegen-mips64.cc

Issue 1295433002: [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
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 3324 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 3343
3344 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 }
3364
3365
3366 void FullCodeGenerator::EmitIsObject(CallRuntime* expr) { 3345 void FullCodeGenerator::EmitIsObject(CallRuntime* expr) {
3367 ZoneList<Expression*>* args = expr->arguments(); 3346 ZoneList<Expression*>* args = expr->arguments();
3368 DCHECK(args->length() == 1); 3347 DCHECK(args->length() == 1);
3369 3348
3370 VisitForAccumulatorValue(args->at(0)); 3349 VisitForAccumulatorValue(args->at(0));
3371 3350
3372 Label materialize_true, materialize_false; 3351 Label materialize_true, materialize_false;
3373 Label* if_true = NULL; 3352 Label* if_true = NULL;
3374 Label* if_false = NULL; 3353 Label* if_false = NULL;
3375 Label* fall_through = NULL; 3354 Label* fall_through = NULL;
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
5106 Label* if_false = NULL; 5085 Label* if_false = NULL;
5107 Label* fall_through = NULL; 5086 Label* fall_through = NULL;
5108 context()->PrepareTest(&materialize_true, &materialize_false, 5087 context()->PrepareTest(&materialize_true, &materialize_false,
5109 &if_true, &if_false, &fall_through); 5088 &if_true, &if_false, &fall_through);
5110 5089
5111 Token::Value op = expr->op(); 5090 Token::Value op = expr->op();
5112 VisitForStackValue(expr->left()); 5091 VisitForStackValue(expr->left());
5113 switch (op) { 5092 switch (op) {
5114 case Token::IN: 5093 case Token::IN:
5115 VisitForStackValue(expr->right()); 5094 VisitForStackValue(expr->right());
5116 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); 5095 __ CallRuntime(Runtime::kHasProperty, 2);
5117 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 5096 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
5118 __ LoadRoot(a4, Heap::kTrueValueRootIndex); 5097 __ LoadRoot(a4, Heap::kTrueValueRootIndex);
5119 Split(eq, v0, Operand(a4), if_true, if_false, fall_through); 5098 Split(eq, v0, Operand(a4), if_true, if_false, fall_through);
5120 break; 5099 break;
5121 5100
5122 case Token::INSTANCEOF: { 5101 case Token::INSTANCEOF: {
5123 VisitForStackValue(expr->right()); 5102 VisitForStackValue(expr->right());
5124 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); 5103 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags);
5125 __ CallStub(&stub); 5104 __ CallStub(&stub);
5126 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 5105 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
5382 reinterpret_cast<uint64_t>( 5361 reinterpret_cast<uint64_t>(
5383 isolate->builtins()->OsrAfterStackCheck()->entry())); 5362 isolate->builtins()->OsrAfterStackCheck()->entry()));
5384 return OSR_AFTER_STACK_CHECK; 5363 return OSR_AFTER_STACK_CHECK;
5385 } 5364 }
5386 5365
5387 5366
5388 } // namespace internal 5367 } // namespace internal
5389 } // namespace v8 5368 } // namespace v8
5390 5369
5391 #endif // V8_TARGET_ARCH_MIPS64 5370 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698