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

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: 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') | src/messages.js » ('J')
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 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { 768 void FullCodeGenerator::VisitDeclaration(Declaration* decl) {
769 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); 769 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun());
770 } 770 }
771 771
772 772
773 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 773 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
774 // Call the runtime to declare the globals. 774 // Call the runtime to declare the globals.
775 // The context is the first argument. 775 // The context is the first argument.
776 __ mov(r2, Operand(pairs)); 776 __ mov(r2, Operand(pairs));
777 __ mov(r1, Operand(Smi::FromInt(is_eval() ? 1 : 0))); 777 __ mov(r1, Operand(Smi::FromInt(is_eval() ? 1 : 0)));
Kevin Millikin (Chromium) 2011/09/01 07:58:24 Don't you have to remove this argument?
Lasse Reichstein 2011/09/01 09:26:58 Absolutely. I'm amazed that it seemed to work. Fix
778 __ mov(r0, Operand(Smi::FromInt(strict_mode_flag()))); 778 __ mov(r0, Operand(Smi::FromInt(DeclareGlobalsFlags())));
779 __ Push(cp, r2, r1, r0); 779 __ Push(cp, r2, r1, r0);
780 __ CallRuntime(Runtime::kDeclareGlobals, 4); 780 __ CallRuntime(Runtime::kDeclareGlobals, 3);
781 // Return value is ignored. 781 // Return value is ignored.
782 } 782 }
783 783
784 784
785 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { 785 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
786 Comment cmnt(masm_, "[ SwitchStatement"); 786 Comment cmnt(masm_, "[ SwitchStatement");
787 Breakable nested_statement(this, stmt); 787 Breakable nested_statement(this, stmt);
788 SetStatementPosition(stmt); 788 SetStatementPosition(stmt);
789 789
790 // Keep the switch value on the stack until a case matches. 790 // Keep the switch value on the stack until a case matches.
(...skipping 3407 matching lines...) Expand 10 before | Expand all | Expand 10 after
4198 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 4198 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
4199 __ add(pc, r1, Operand(masm_->CodeObject())); 4199 __ add(pc, r1, Operand(masm_->CodeObject()));
4200 } 4200 }
4201 4201
4202 4202
4203 #undef __ 4203 #undef __
4204 4204
4205 } } // namespace v8::internal 4205 } } // namespace v8::internal
4206 4206
4207 #endif // V8_TARGET_ARCH_ARM 4207 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/messages.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698