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/mips/full-codegen-mips.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/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.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 2672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 2683
2684 VisitForAccumulatorValue(args->at(0)); 2684 VisitForAccumulatorValue(args->at(0));
2685 2685
2686 Label materialize_true, materialize_false; 2686 Label materialize_true, materialize_false;
2687 Label* if_true = NULL; 2687 Label* if_true = NULL;
2688 Label* if_false = NULL; 2688 Label* if_false = NULL;
2689 Label* fall_through = NULL; 2689 Label* fall_through = NULL;
2690 context()->PrepareTest(&materialize_true, &materialize_false, 2690 context()->PrepareTest(&materialize_true, &materialize_false,
2691 &if_true, &if_false, &fall_through); 2691 &if_true, &if_false, &fall_through);
2692 2692
2693 if (generate_debug_code_) __ AbortIfSmi(v0); 2693 __ AssertNotSmi(v0);
2694 2694
2695 __ lw(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); 2695 __ lw(a1, FieldMemOperand(v0, HeapObject::kMapOffset));
2696 __ lbu(t0, FieldMemOperand(a1, Map::kBitField2Offset)); 2696 __ lbu(t0, FieldMemOperand(a1, Map::kBitField2Offset));
2697 __ And(t0, t0, 1 << Map::kStringWrapperSafeForDefaultValueOf); 2697 __ And(t0, t0, 1 << Map::kStringWrapperSafeForDefaultValueOf);
2698 __ Branch(if_true, ne, t0, Operand(zero_reg)); 2698 __ Branch(if_true, ne, t0, Operand(zero_reg));
2699 2699
2700 // Check for fast case object. Generate false result for slow case object. 2700 // Check for fast case object. Generate false result for slow case object.
2701 __ lw(a2, FieldMemOperand(v0, JSObject::kPropertiesOffset)); 2701 __ lw(a2, FieldMemOperand(v0, JSObject::kPropertiesOffset));
2702 __ lw(a2, FieldMemOperand(a2, HeapObject::kMapOffset)); 2702 __ lw(a2, FieldMemOperand(a2, HeapObject::kMapOffset));
2703 __ LoadRoot(t0, Heap::kHashTableMapRootIndex); 2703 __ LoadRoot(t0, Heap::kHashTableMapRootIndex);
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
3564 3564
3565 context()->Plug(if_true, if_false); 3565 context()->Plug(if_true, if_false);
3566 } 3566 }
3567 3567
3568 3568
3569 void FullCodeGenerator::EmitGetCachedArrayIndex(CallRuntime* expr) { 3569 void FullCodeGenerator::EmitGetCachedArrayIndex(CallRuntime* expr) {
3570 ZoneList<Expression*>* args = expr->arguments(); 3570 ZoneList<Expression*>* args = expr->arguments();
3571 ASSERT(args->length() == 1); 3571 ASSERT(args->length() == 1);
3572 VisitForAccumulatorValue(args->at(0)); 3572 VisitForAccumulatorValue(args->at(0));
3573 3573
3574 __ AbortIfNotString(v0); 3574 __ AssertString(v0);
3575 3575
3576 __ lw(v0, FieldMemOperand(v0, String::kHashFieldOffset)); 3576 __ lw(v0, FieldMemOperand(v0, String::kHashFieldOffset));
3577 __ IndexFromHash(v0, v0); 3577 __ IndexFromHash(v0, v0);
3578 3578
3579 context()->Plug(v0); 3579 context()->Plug(v0);
3580 } 3580 }
3581 3581
3582 3582
3583 void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) { 3583 void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
3584 Label bailout, done, one_char_separator, long_separator, 3584 Label bailout, done, one_char_separator, long_separator,
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
4568 *context_length = 0; 4568 *context_length = 0;
4569 return previous_; 4569 return previous_;
4570 } 4570 }
4571 4571
4572 4572
4573 #undef __ 4573 #undef __
4574 4574
4575 } } // namespace v8::internal 4575 } } // namespace v8::internal
4576 4576
4577 #endif // V8_TARGET_ARCH_MIPS 4577 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698