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

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

Issue 7736018: Make functions on the built-in object non-writable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/messages.js ('k') | src/runtime.h » ('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 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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 774
775 775
776 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { 776 void FullCodeGenerator::VisitDeclaration(Declaration* decl) {
777 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); 777 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun());
778 } 778 }
779 779
780 780
781 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 781 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
782 // Call the runtime to declare the globals. 782 // Call the runtime to declare the globals.
783 // The context is the first argument. 783 // The context is the first argument.
784 __ li(a2, Operand(pairs)); 784 __ li(a1, Operand(pairs));
785 __ li(a1, Operand(Smi::FromInt(is_eval() ? 1 : 0))); 785 __ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags())));
786 __ li(a0, Operand(Smi::FromInt(strict_mode_flag()))); 786 __ Push(cp, a1, a0);
787 __ Push(cp, a2, a1, a0); 787 __ CallRuntime(Runtime::kDeclareGlobals, 3);
788 __ CallRuntime(Runtime::kDeclareGlobals, 4);
789 // Return value is ignored. 788 // Return value is ignored.
790 } 789 }
791 790
792 791
793 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { 792 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
794 Comment cmnt(masm_, "[ SwitchStatement"); 793 Comment cmnt(masm_, "[ SwitchStatement");
795 Breakable nested_statement(this, stmt); 794 Breakable nested_statement(this, stmt);
796 SetStatementPosition(stmt); 795 SetStatementPosition(stmt);
797 796
798 // Keep the switch value on the stack until a case matches. 797 // Keep the switch value on the stack until a case matches.
(...skipping 3483 matching lines...) Expand 10 before | Expand all | Expand 10 after
4282 __ Addu(at, a1, Operand(masm_->CodeObject())); 4281 __ Addu(at, a1, Operand(masm_->CodeObject()));
4283 __ Jump(at); 4282 __ Jump(at);
4284 } 4283 }
4285 4284
4286 4285
4287 #undef __ 4286 #undef __
4288 4287
4289 } } // namespace v8::internal 4288 } } // namespace v8::internal
4290 4289
4291 #endif // V8_TARGET_ARCH_MIPS 4290 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698