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

Side by Side Diff: src/arm/full-codegen-arm.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 | « no previous file | src/bootstrapper.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 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 767
768 768
769 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { 769 void FullCodeGenerator::VisitDeclaration(Declaration* decl) {
770 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); 770 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun());
771 } 771 }
772 772
773 773
774 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 774 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
775 // Call the runtime to declare the globals. 775 // Call the runtime to declare the globals.
776 // The context is the first argument. 776 // The context is the first argument.
777 __ mov(r2, Operand(pairs)); 777 __ mov(r1, Operand(pairs));
778 __ mov(r1, Operand(Smi::FromInt(is_eval() ? 1 : 0))); 778 __ mov(r0, Operand(Smi::FromInt(DeclareGlobalsFlags())));
779 __ mov(r0, Operand(Smi::FromInt(strict_mode_flag()))); 779 __ Push(cp, r1, r0);
780 __ Push(cp, r2, r1, r0); 780 __ CallRuntime(Runtime::kDeclareGlobals, 3);
781 __ CallRuntime(Runtime::kDeclareGlobals, 4);
782 // Return value is ignored. 781 // Return value is ignored.
783 } 782 }
784 783
785 784
786 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { 785 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
787 Comment cmnt(masm_, "[ SwitchStatement"); 786 Comment cmnt(masm_, "[ SwitchStatement");
788 Breakable nested_statement(this, stmt); 787 Breakable nested_statement(this, stmt);
789 SetStatementPosition(stmt); 788 SetStatementPosition(stmt);
790 789
791 // Keep the switch value on the stack until a case matches. 790 // Keep the switch value on the stack until a case matches.
(...skipping 3474 matching lines...) Expand 10 before | Expand all | Expand 10 after
4266 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 4265 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
4267 __ add(pc, r1, Operand(masm_->CodeObject())); 4266 __ add(pc, r1, Operand(masm_->CodeObject()));
4268 } 4267 }
4269 4268
4270 4269
4271 #undef __ 4270 #undef __
4272 4271
4273 } } // namespace v8::internal 4272 } } // namespace v8::internal
4274 4273
4275 #endif // V8_TARGET_ARCH_ARM 4274 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698