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

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

Issue 1313903003: [runtime] Remove the redundant %_IsObject intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michis comment. 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 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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 3344 matching lines...) Expand 10 before | Expand all | Expand 10 after
3355 &if_true, &if_false, &fall_through); 3355 &if_true, &if_false, &fall_through);
3356 3356
3357 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3357 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3358 __ NonNegativeSmiTst(v0, at); 3358 __ NonNegativeSmiTst(v0, at);
3359 Split(eq, at, Operand(zero_reg), if_true, if_false, fall_through); 3359 Split(eq, at, Operand(zero_reg), if_true, if_false, fall_through);
3360 3360
3361 context()->Plug(if_true, if_false); 3361 context()->Plug(if_true, if_false);
3362 } 3362 }
3363 3363
3364 3364
3365 void FullCodeGenerator::EmitIsObject(CallRuntime* expr) {
3366 ZoneList<Expression*>* args = expr->arguments();
3367 DCHECK(args->length() == 1);
3368
3369 VisitForAccumulatorValue(args->at(0));
3370
3371 Label materialize_true, materialize_false;
3372 Label* if_true = NULL;
3373 Label* if_false = NULL;
3374 Label* fall_through = NULL;
3375 context()->PrepareTest(&materialize_true, &materialize_false,
3376 &if_true, &if_false, &fall_through);
3377
3378 __ JumpIfSmi(v0, if_false);
3379 __ LoadRoot(at, Heap::kNullValueRootIndex);
3380 __ Branch(if_true, eq, v0, Operand(at));
3381 __ lw(a2, FieldMemOperand(v0, HeapObject::kMapOffset));
3382 // Undetectable objects behave like undefined when tested with typeof.
3383 __ lbu(a1, FieldMemOperand(a2, Map::kBitFieldOffset));
3384 __ And(at, a1, Operand(1 << Map::kIsUndetectable));
3385 __ Branch(if_false, ne, at, Operand(zero_reg));
3386 __ lbu(a1, FieldMemOperand(a2, Map::kInstanceTypeOffset));
3387 __ Branch(if_false, lt, a1, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
3388 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3389 Split(le, a1, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE),
3390 if_true, if_false, fall_through);
3391
3392 context()->Plug(if_true, if_false);
3393 }
3394
3395
3396 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) { 3365 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) {
3397 ZoneList<Expression*>* args = expr->arguments(); 3366 ZoneList<Expression*>* args = expr->arguments();
3398 DCHECK(args->length() == 1); 3367 DCHECK(args->length() == 1);
3399 3368
3400 VisitForAccumulatorValue(args->at(0)); 3369 VisitForAccumulatorValue(args->at(0));
3401 3370
3402 Label materialize_true, materialize_false; 3371 Label materialize_true, materialize_false;
3403 Label* if_true = NULL; 3372 Label* if_true = NULL;
3404 Label* if_false = NULL; 3373 Label* if_false = NULL;
3405 Label* fall_through = NULL; 3374 Label* fall_through = NULL;
(...skipping 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after
5378 reinterpret_cast<uint32_t>( 5347 reinterpret_cast<uint32_t>(
5379 isolate->builtins()->OsrAfterStackCheck()->entry())); 5348 isolate->builtins()->OsrAfterStackCheck()->entry()));
5380 return OSR_AFTER_STACK_CHECK; 5349 return OSR_AFTER_STACK_CHECK;
5381 } 5350 }
5382 5351
5383 5352
5384 } // namespace internal 5353 } // namespace internal
5385 } // namespace v8 5354 } // namespace v8
5386 5355
5387 #endif // V8_TARGET_ARCH_MIPS 5356 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698