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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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
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_PPC 5 #if V8_TARGET_ARCH_PPC
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 3253 matching lines...) Expand 10 before | Expand all | Expand 10 after
3264 &if_false, &fall_through); 3264 &if_false, &fall_through);
3265 3265
3266 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3266 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3267 __ TestIfSmi(r3, r0); 3267 __ TestIfSmi(r3, r0);
3268 Split(eq, if_true, if_false, fall_through, cr0); 3268 Split(eq, if_true, if_false, fall_through, cr0);
3269 3269
3270 context()->Plug(if_true, if_false); 3270 context()->Plug(if_true, if_false);
3271 } 3271 }
3272 3272
3273 3273
3274 void FullCodeGenerator::EmitIsNonNegativeSmi(CallRuntime* expr) {
3275 ZoneList<Expression*>* args = expr->arguments();
3276 DCHECK(args->length() == 1);
3277
3278 VisitForAccumulatorValue(args->at(0));
3279
3280 Label materialize_true, materialize_false;
3281 Label* if_true = NULL;
3282 Label* if_false = NULL;
3283 Label* fall_through = NULL;
3284 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3285 &if_false, &fall_through);
3286
3287 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3288 __ TestIfPositiveSmi(r3, r0);
3289 Split(eq, if_true, if_false, fall_through, cr0);
3290
3291 context()->Plug(if_true, if_false);
3292 }
3293
3294
3295 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) { 3274 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) {
3296 ZoneList<Expression*>* args = expr->arguments(); 3275 ZoneList<Expression*>* args = expr->arguments();
3297 DCHECK(args->length() == 1); 3276 DCHECK(args->length() == 1);
3298 3277
3299 VisitForAccumulatorValue(args->at(0)); 3278 VisitForAccumulatorValue(args->at(0));
3300 3279
3301 Label materialize_true, materialize_false; 3280 Label materialize_true, materialize_false;
3302 Label* if_true = NULL; 3281 Label* if_true = NULL;
3303 Label* if_false = NULL; 3282 Label* if_false = NULL;
3304 Label* fall_through = NULL; 3283 Label* fall_through = NULL;
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
5052 Label* if_false = NULL; 5031 Label* if_false = NULL;
5053 Label* fall_through = NULL; 5032 Label* fall_through = NULL;
5054 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, 5033 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
5055 &if_false, &fall_through); 5034 &if_false, &fall_through);
5056 5035
5057 Token::Value op = expr->op(); 5036 Token::Value op = expr->op();
5058 VisitForStackValue(expr->left()); 5037 VisitForStackValue(expr->left());
5059 switch (op) { 5038 switch (op) {
5060 case Token::IN: 5039 case Token::IN:
5061 VisitForStackValue(expr->right()); 5040 VisitForStackValue(expr->right());
5062 __ InvokeBuiltin(Context::IN_BUILTIN_INDEX, CALL_FUNCTION); 5041 __ CallRuntime(Runtime::kHasProperty, 2);
5063 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 5042 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
5064 __ CompareRoot(r3, Heap::kTrueValueRootIndex); 5043 __ CompareRoot(r3, Heap::kTrueValueRootIndex);
5065 Split(eq, if_true, if_false, fall_through); 5044 Split(eq, if_true, if_false, fall_through);
5066 break; 5045 break;
5067 5046
5068 case Token::INSTANCEOF: { 5047 case Token::INSTANCEOF: {
5069 VisitForAccumulatorValue(expr->right()); 5048 VisitForAccumulatorValue(expr->right());
5070 __ pop(r4); 5049 __ pop(r4);
5071 InstanceOfStub stub(isolate()); 5050 InstanceOfStub stub(isolate());
5072 __ CallStub(&stub); 5051 __ CallStub(&stub);
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
5315 return ON_STACK_REPLACEMENT; 5294 return ON_STACK_REPLACEMENT;
5316 } 5295 }
5317 5296
5318 DCHECK(interrupt_address == 5297 DCHECK(interrupt_address ==
5319 isolate->builtins()->OsrAfterStackCheck()->entry()); 5298 isolate->builtins()->OsrAfterStackCheck()->entry());
5320 return OSR_AFTER_STACK_CHECK; 5299 return OSR_AFTER_STACK_CHECK;
5321 } 5300 }
5322 } // namespace internal 5301 } // namespace internal
5323 } // namespace v8 5302 } // namespace v8
5324 #endif // V8_TARGET_ARCH_PPC 5303 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698