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

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

Issue 7278024: MIPS: port Do not pass the global object as the receiver to strict-mode ... (Closed)
Patch Set: Created 9 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3578 matching lines...) Expand 10 before | Expand all | Expand 10 after
3589 ASSERT(result.is(v0)); 3589 ASSERT(result.is(v0));
3590 __ Branch(&done); 3590 __ Branch(&done);
3591 3591
3592 __ bind(&bailout); 3592 __ bind(&bailout);
3593 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); 3593 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
3594 __ bind(&done); 3594 __ bind(&done);
3595 context()->Plug(v0); 3595 context()->Plug(v0);
3596 } 3596 }
3597 3597
3598 3598
3599 void FullCodeGenerator::EmitIsNativeOrStrictMode(ZoneList<Expression*>* args) {
3600 ASSERT(args->length() == 1);
3601
3602 // Load the function into v0.
3603 VisitForAccumulatorValue(args->at(0));
3604
3605 // Prepare for the test.
3606 Label materialize_true, materialize_false;
3607 Label* if_true = NULL;
3608 Label* if_false = NULL;
3609 Label* fall_through = NULL;
3610 context()->PrepareTest(&materialize_true, &materialize_false,
3611 &if_true, &if_false, &fall_through);
3612
3613 // Test for strict mode function.
3614 __ lw(a1, FieldMemOperand(v0, JSFunction::kSharedFunctionInfoOffset));
3615 __ lw(a1, FieldMemOperand(a1, SharedFunctionInfo::kCompilerHintsOffset));
3616 __ And(at, a1, Operand(1 << (SharedFunctionInfo::kStrictModeFunction +
3617 kSmiTagSize)));
3618 __ Branch(if_true, ne, at, Operand(zero_reg));
3619
3620 // Test for native function.
3621 __ And(at, a1, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize)));
3622 __ Branch(if_true, ne, at, Operand(zero_reg));
3623
3624 // Not native or strict-mode function.
3625 __ Branch(if_false);
3626
3627 PrepareForBailoutBeforeSplit(TOS_REG, true, if_true, if_false);
3628 context()->Plug(if_true, if_false);
3629 }
3630
3631
3599 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { 3632 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
3600 Handle<String> name = expr->name(); 3633 Handle<String> name = expr->name();
3601 if (name->length() > 0 && name->Get(0) == '_') { 3634 if (name->length() > 0 && name->Get(0) == '_') {
3602 Comment cmnt(masm_, "[ InlineRuntimeCall"); 3635 Comment cmnt(masm_, "[ InlineRuntimeCall");
3603 EmitInlineRuntimeCall(expr); 3636 EmitInlineRuntimeCall(expr);
3604 return; 3637 return;
3605 } 3638 }
3606 3639
3607 Comment cmnt(masm_, "[ CallRuntime"); 3640 Comment cmnt(masm_, "[ CallRuntime");
3608 ZoneList<Expression*>* args = expr->arguments(); 3641 ZoneList<Expression*>* args = expr->arguments();
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
4272 __ Addu(at, a1, Operand(masm_->CodeObject())); 4305 __ Addu(at, a1, Operand(masm_->CodeObject()));
4273 __ Jump(at); 4306 __ Jump(at);
4274 } 4307 }
4275 4308
4276 4309
4277 #undef __ 4310 #undef __
4278 4311
4279 } } // namespace v8::internal 4312 } } // namespace v8::internal
4280 4313
4281 #endif // V8_TARGET_ARCH_MIPS 4314 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698