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

Side by Side Diff: src/ia32/full-codegen-ia32.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/full-codegen.cc ('k') | src/macros.py » ('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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 764
765 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { 765 void FullCodeGenerator::VisitDeclaration(Declaration* decl) {
766 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); 766 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun());
767 } 767 }
768 768
769 769
770 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 770 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
771 // Call the runtime to declare the globals. 771 // Call the runtime to declare the globals.
772 __ push(esi); // The context is the first argument. 772 __ push(esi); // The context is the first argument.
773 __ push(Immediate(pairs)); 773 __ push(Immediate(pairs));
774 __ push(Immediate(Smi::FromInt(is_eval() ? 1 : 0))); 774 __ push(Immediate(Smi::FromInt(DeclareGlobalsFlags())));
775 __ push(Immediate(Smi::FromInt(strict_mode_flag()))); 775 __ CallRuntime(Runtime::kDeclareGlobals, 3);
776 __ CallRuntime(Runtime::kDeclareGlobals, 4);
777 // Return value is ignored. 776 // Return value is ignored.
778 } 777 }
779 778
780 779
781 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { 780 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
782 Comment cmnt(masm_, "[ SwitchStatement"); 781 Comment cmnt(masm_, "[ SwitchStatement");
783 Breakable nested_statement(this, stmt); 782 Breakable nested_statement(this, stmt);
784 SetStatementPosition(stmt); 783 SetStatementPosition(stmt);
785 784
786 int switch_clause_stack_height = stack_height(); 785 int switch_clause_stack_height = stack_height();
(...skipping 3537 matching lines...) Expand 10 before | Expand all | Expand 10 after
4324 __ add(Operand(edx), Immediate(masm_->CodeObject())); 4323 __ add(Operand(edx), Immediate(masm_->CodeObject()));
4325 __ jmp(Operand(edx)); 4324 __ jmp(Operand(edx));
4326 } 4325 }
4327 4326
4328 4327
4329 #undef __ 4328 #undef __
4330 4329
4331 } } // namespace v8::internal 4330 } } // namespace v8::internal
4332 4331
4333 #endif // V8_TARGET_ARCH_IA32 4332 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698