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

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

Issue 11108011: Ensure that we do not accidentally emit debug code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed indentation Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after
2652 2652
2653 VisitForAccumulatorValue(args->at(0)); 2653 VisitForAccumulatorValue(args->at(0));
2654 2654
2655 Label materialize_true, materialize_false; 2655 Label materialize_true, materialize_false;
2656 Label* if_true = NULL; 2656 Label* if_true = NULL;
2657 Label* if_false = NULL; 2657 Label* if_false = NULL;
2658 Label* fall_through = NULL; 2658 Label* fall_through = NULL;
2659 context()->PrepareTest(&materialize_true, &materialize_false, 2659 context()->PrepareTest(&materialize_true, &materialize_false,
2660 &if_true, &if_false, &fall_through); 2660 &if_true, &if_false, &fall_through);
2661 2661
2662 if (generate_debug_code_) __ AbortIfSmi(r0); 2662 __ AssertNotSmi(r0);
2663 2663
2664 __ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset)); 2664 __ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset));
2665 __ ldrb(ip, FieldMemOperand(r1, Map::kBitField2Offset)); 2665 __ ldrb(ip, FieldMemOperand(r1, Map::kBitField2Offset));
2666 __ tst(ip, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); 2666 __ tst(ip, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf));
2667 __ b(ne, if_true); 2667 __ b(ne, if_true);
2668 2668
2669 // Check for fast case object. Generate false result for slow case object. 2669 // Check for fast case object. Generate false result for slow case object.
2670 __ ldr(r2, FieldMemOperand(r0, JSObject::kPropertiesOffset)); 2670 __ ldr(r2, FieldMemOperand(r0, JSObject::kPropertiesOffset));
2671 __ ldr(r2, FieldMemOperand(r2, HeapObject::kMapOffset)); 2671 __ ldr(r2, FieldMemOperand(r2, HeapObject::kMapOffset));
2672 __ LoadRoot(ip, Heap::kHashTableMapRootIndex); 2672 __ LoadRoot(ip, Heap::kHashTableMapRootIndex);
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
3527 3527
3528 context()->Plug(if_true, if_false); 3528 context()->Plug(if_true, if_false);
3529 } 3529 }
3530 3530
3531 3531
3532 void FullCodeGenerator::EmitGetCachedArrayIndex(CallRuntime* expr) { 3532 void FullCodeGenerator::EmitGetCachedArrayIndex(CallRuntime* expr) {
3533 ZoneList<Expression*>* args = expr->arguments(); 3533 ZoneList<Expression*>* args = expr->arguments();
3534 ASSERT(args->length() == 1); 3534 ASSERT(args->length() == 1);
3535 VisitForAccumulatorValue(args->at(0)); 3535 VisitForAccumulatorValue(args->at(0));
3536 3536
3537 __ AbortIfNotString(r0); 3537 __ AssertString(r0);
3538
3539 3538
3540 __ ldr(r0, FieldMemOperand(r0, String::kHashFieldOffset)); 3539 __ ldr(r0, FieldMemOperand(r0, String::kHashFieldOffset));
3541 __ IndexFromHash(r0, r0); 3540 __ IndexFromHash(r0, r0);
3542 3541
3543 context()->Plug(r0); 3542 context()->Plug(r0);
3544 } 3543 }
3545 3544
3546 3545
3547 void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) { 3546 void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
3548 Label bailout, done, one_char_separator, long_separator, 3547 Label bailout, done, one_char_separator, long_separator,
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
4529 *context_length = 0; 4528 *context_length = 0;
4530 return previous_; 4529 return previous_;
4531 } 4530 }
4532 4531
4533 4532
4534 #undef __ 4533 #undef __
4535 4534
4536 } } // namespace v8::internal 4535 } } // namespace v8::internal
4537 4536
4538 #endif // V8_TARGET_ARCH_ARM 4537 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698