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

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: REBASE again. Remove unused ReplaceWithBuiltinCall. 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/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 3256 matching lines...) Expand 10 before | Expand all | Expand 10 after
3267 &if_true, &if_false, &fall_through); 3267 &if_true, &if_false, &fall_through);
3268 3268
3269 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3269 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3270 __ SmiTst(v0, a4); 3270 __ SmiTst(v0, a4);
3271 Split(eq, a4, Operand(zero_reg), if_true, if_false, fall_through); 3271 Split(eq, a4, Operand(zero_reg), if_true, if_false, fall_through);
3272 3272
3273 context()->Plug(if_true, if_false); 3273 context()->Plug(if_true, if_false);
3274 } 3274 }
3275 3275
3276 3276
3277 void FullCodeGenerator::EmitIsNonNegativeSmi(CallRuntime* expr) {
3278 ZoneList<Expression*>* args = expr->arguments();
3279 DCHECK(args->length() == 1);
3280
3281 VisitForAccumulatorValue(args->at(0));
3282
3283 Label materialize_true, materialize_false;
3284 Label* if_true = NULL;
3285 Label* if_false = NULL;
3286 Label* fall_through = NULL;
3287 context()->PrepareTest(&materialize_true, &materialize_false,
3288 &if_true, &if_false, &fall_through);
3289
3290 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3291 __ NonNegativeSmiTst(v0, at);
3292 Split(eq, at, Operand(zero_reg), if_true, if_false, fall_through);
3293
3294 context()->Plug(if_true, if_false);
3295 }
3296
3297
3298 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) { 3277 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) {
3299 ZoneList<Expression*>* args = expr->arguments(); 3278 ZoneList<Expression*>* args = expr->arguments();
3300 DCHECK(args->length() == 1); 3279 DCHECK(args->length() == 1);
3301 3280
3302 VisitForAccumulatorValue(args->at(0)); 3281 VisitForAccumulatorValue(args->at(0));
3303 3282
3304 Label materialize_true, materialize_false; 3283 Label materialize_true, materialize_false;
3305 Label* if_true = NULL; 3284 Label* if_true = NULL;
3306 Label* if_false = NULL; 3285 Label* if_false = NULL;
3307 Label* fall_through = NULL; 3286 Label* fall_through = NULL;
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after
5068 Label* if_false = NULL; 5047 Label* if_false = NULL;
5069 Label* fall_through = NULL; 5048 Label* fall_through = NULL;
5070 context()->PrepareTest(&materialize_true, &materialize_false, 5049 context()->PrepareTest(&materialize_true, &materialize_false,
5071 &if_true, &if_false, &fall_through); 5050 &if_true, &if_false, &fall_through);
5072 5051
5073 Token::Value op = expr->op(); 5052 Token::Value op = expr->op();
5074 VisitForStackValue(expr->left()); 5053 VisitForStackValue(expr->left());
5075 switch (op) { 5054 switch (op) {
5076 case Token::IN: 5055 case Token::IN:
5077 VisitForStackValue(expr->right()); 5056 VisitForStackValue(expr->right());
5078 __ InvokeBuiltin(Context::IN_BUILTIN_INDEX, CALL_FUNCTION); 5057 __ CallRuntime(Runtime::kHasProperty, 2);
5079 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 5058 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
5080 __ LoadRoot(a4, Heap::kTrueValueRootIndex); 5059 __ LoadRoot(a4, Heap::kTrueValueRootIndex);
5081 Split(eq, v0, Operand(a4), if_true, if_false, fall_through); 5060 Split(eq, v0, Operand(a4), if_true, if_false, fall_through);
5082 break; 5061 break;
5083 5062
5084 case Token::INSTANCEOF: { 5063 case Token::INSTANCEOF: {
5085 VisitForAccumulatorValue(expr->right()); 5064 VisitForAccumulatorValue(expr->right());
5086 __ mov(a0, result_register()); 5065 __ mov(a0, result_register());
5087 __ pop(a1); 5066 __ pop(a1);
5088 InstanceOfStub stub(isolate()); 5067 InstanceOfStub stub(isolate());
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
5346 reinterpret_cast<uint64_t>( 5325 reinterpret_cast<uint64_t>(
5347 isolate->builtins()->OsrAfterStackCheck()->entry())); 5326 isolate->builtins()->OsrAfterStackCheck()->entry()));
5348 return OSR_AFTER_STACK_CHECK; 5327 return OSR_AFTER_STACK_CHECK;
5349 } 5328 }
5350 5329
5351 5330
5352 } // namespace internal 5331 } // namespace internal
5353 } // namespace v8 5332 } // namespace v8
5354 5333
5355 #endif // V8_TARGET_ARCH_MIPS64 5334 #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