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

Side by Side Diff: src/x64/full-codegen-x64.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
« src/v8globals.h ('K') | « src/v8globals.h ('k') | 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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 734
735 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { 735 void FullCodeGenerator::VisitDeclaration(Declaration* decl) {
736 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); 736 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun());
737 } 737 }
738 738
739 739
740 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 740 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
741 // Call the runtime to declare the globals. 741 // Call the runtime to declare the globals.
742 __ push(rsi); // The context is the first argument. 742 __ push(rsi); // The context is the first argument.
743 __ Push(pairs); 743 __ Push(pairs);
744 __ Push(Smi::FromInt(is_eval() ? 1 : 0)); 744 __ Push(Smi::FromInt(DeclareGlobalsFlags()));
745 __ Push(Smi::FromInt(strict_mode_flag())); 745 __ CallRuntime(Runtime::kDeclareGlobals, 3);
746 __ CallRuntime(Runtime::kDeclareGlobals, 4);
747 // Return value is ignored. 746 // Return value is ignored.
748 } 747 }
749 748
750 749
751 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { 750 void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
752 Comment cmnt(masm_, "[ SwitchStatement"); 751 Comment cmnt(masm_, "[ SwitchStatement");
753 Breakable nested_statement(this, stmt); 752 Breakable nested_statement(this, stmt);
754 SetStatementPosition(stmt); 753 SetStatementPosition(stmt);
755 754
756 // Keep the switch value on the stack until a case matches. 755 // Keep the switch value on the stack until a case matches.
(...skipping 3384 matching lines...) Expand 10 before | Expand all | Expand 10 after
4141 __ jmp(rdx); 4140 __ jmp(rdx);
4142 } 4141 }
4143 4142
4144 4143
4145 #undef __ 4144 #undef __
4146 4145
4147 4146
4148 } } // namespace v8::internal 4147 } } // namespace v8::internal
4149 4148
4150 #endif // V8_TARGET_ARCH_X64 4149 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/v8globals.h ('K') | « src/v8globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698